Use the ingredients, egg, flour, margarine, yoghurt, garlic, cheese and salt to make a smooth shortcrust pastry. Let rest in the refrigerator for half an hour.
Peel the onion and cut into fine rings, briefly blanch in boiling water.
Cut the ham into small cubes. Mix the cream, cream, eggs, cheese and onions into a mixture, season with pepper, salt and nutmeg (mix in fresh herbs if necessary).
Put the dough in a springform pan and press a 3 cm high edge onto it, poke holes in the dough with a fork. Pre-bake for about 10 minutes at 200 degrees, distribute the mixture over the dough and bake for another 30 minutes at 200 degrees.