Mix the dough ingredients with your hands and knead vigorously to form a dough. Shape the dough into a ball and leave to rest in the refrigerator in cling film for about 45 minutes.
Meanwhile, chop the onions and garlic as finely as possible.
Take the dough out of the fridge and preheat the oven to 200 ° C top / bottom heat (recommended so that the base is crispy, but otherwise 180 ° C with circulating air is also possible). Heat a teaspoon of oil in a (coated) pan and fry the onions and garlic until translucent, but not crispy. Finally stir in the ham cubes for a minute and fry them. Put everything in a bowl and let cool down for 5 minutes.
Mix the yogurt with the cornstarch so that it is not too runny later. Add the eggs and spices and whisk.
Line the bottom of the pan with baking paper and thinly spread margarine on the edge. If available, spread breadcrumbs on the edge and the baking paper. Roll out the dough, place it in the pan and press up one edge.
Mix the yogurt mixture with the onion mixture and pour into the mold on the dough. Bake for 45 minutes at 200 (180) ° C.