Grease the casserole dish (approx. 25 cm Ø) and line the bottom with strips of bacon. Peel, wash and grate the potatoes. Put the potatoes in a sieve, squeeze them out and let the liquid drip off into a bowl. Let the liquid stand for about 10 minutes until the starch has settled. Peel and halve the onions and cut or slice them into thin slices. Wash the marjoram, shake dry and chop the leaves of 6 stems finely. Drain potato liquid
Mix potatoes, eggs, slices of onion, chopped thyme and starch, season with salt, pepper and nutmeg. Pour the potato mixture into the greased form and bake in a preheated oven (electric cooker: 175 °C/ convection oven: 150 °C/ gas: see manufacturer) for approx. 1 3/4 hours
Peel and quarter the apples and remove the core. Cut the quarter into small pieces. Caramelise sugar in a pot until light, then add apple pieces. Cover and simmer for about 15 minutes
Take the cake out of the oven and turn it over. Garnish the cake with marjoram, cut into cake pieces and serve with the apple compote. Serve with a small salad