For the dough, sieve the flour, make a well in the middle and add the salt with the egg yolk. Spread the butter in flakes and knead everything into a smooth dough, adding the water. Shape the dough into a ball and wrap in foil and place in a cool place for 45 minutes.
In the meantime, peel the onion and garlic cloves for the filling. Cut the onion into cubes, finely chop the garlic.
Fry the bacon vigorously in a wide pan and let it become slightly crispy. Heat the oil in it, add the onion and let it turn glassy and golden yellow, but not brown, over a gentle heat. Fry the garlic briefly in it, then sieve the flour over it, mix in well and sweat it through without browning. Whisk the sour cream with mustard, egg yolk, eggs and spices well and work under the onion mixture, which is still warm. Season to taste.
Roll out the dough on a floured work surface into a round plate about 30 cm in diameter and line a greased springform pan (28 cm diameter) with it. Prick the base several times with a fork, push the dough up a little at the edge. Pour in the onion mixture and bake the cake in the preheated oven at 200 ° (electric stove) for 45 minutes!
The onion cake is served lukewarm, and it tastes delicious cold too!