For the pastry, mix flour, butter, cottage cheese, egg yolks and a pinch of salt. Quickly knead until smooth.Wrap in plastic and refrigerate for 4 hours. Halve the onions, and slice. Heat the olive oil in a pan. Sauté the onions (without the spring onions), stirring them quickly until they are transparent. Remove from heat and allow to cool. Preheat the oven to 200 °C.Grease the cake form with butter. On top of a floured surface, roll out the dough with a rolling pin about 3mm thick and place in the tray so that about 2 cmof it hangs over the edge. Distribute the onions equally over the dough. For the filling, whisk the eggs and the cream. Cut the leek and spring onions (only the white part) into rings and mix into the egg mixture with the bacon and cheese. Pour over the pastry. To form an attractive crust, use thumb and forefinger to shape the edge of the pastry around the edges of the tart form. Bake for about 40 minutes. Remove from the oven and leave to sit for about 10 minutes before cutting.