Peel onions and cut off approx. 1/3, put the lid aside. Steam onions in a large pot covered with a little water for about 30 minutes. Finely dice the removed lids and place in a bowl. Wash the thyme, dab dry, put some aside for garnishing, chop the rest finely. Grate the Gouda coarsely. Add the onions to the minced pork, thyme and gouda. Season with pepper and knead well
Wash and halve apples and remove the core with a melon ball cutter, sprinkle with lemon juice. Place the vegetable onions and apples with the cut surface facing upwards in a large or two small casserole dishes close together. Spread the meat mass as a cap on the onions and apples. Cut the bacon slices in half and spread on the mince. Mix cream and stock and pour into the casserole dish. Bake in the preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: level 3) for approx. 40 minutes
Wash, peel and cut the potatoes into pieces. Cook in boiling salted water for about 20 minutes. Pour off water, let it evaporate briefly. Add butter and milk and mash everything to a pulp. Season to taste with salt and nutmeg. Garnish vegetable onions and apples with thyme that has been set aside. Serve with mashed potatoes