Preheat oven (electric cooker: 225 °C/circulating air: 200 °C/gas: see manufacturer). Peel and finely dice onion. Heat oil in a pan. Fry the minced meat in it until crumbly. Fry ham cubes, onion and 1 tsp. marjoram briefly.
Season with salt and pepper. Add 300 ml water and stock, bring to the boil once.
Layer uncooked spaetzle and minced sauce in a casserole dish. Grate the parmesan and pour cream over it. Sprinkle with fried onions. Bake in a hot oven for about 15 minutes.