For the pastry, place the flour, butter, sugar and egg into a food processor and pulse until just coming together as a dough (add a little milk if necessary to bring the dough together).
Bring the dough together into a ball, wrap in cling film and place into the fridge to chill for at least an hour.
Unwrap and roll out the pastry onto a floured work surface to fit a 20cm/8in tart case. Press the pastry into the case and place into the fridge to chill for 45 minutes.
Preheat the oven to 200F/400F/Gas 6.
Place the chilled tart case into the oven to bake for 10-15 minutes, until golden-brown. Remove from the oven and leave to cool.
Reduce the oven temperature to 180C/355F/Gas 4.
Meanwhile, for the filling, heat the butter and oil together in a large, heavy-bottomed saucepan over a low heat.
Add the onions and garlic and season well with salt and freshly ground black pepper. Cook the onions very gently for about 30-40 minutes until very soft and golden, but not browned.
Whisk together the eggs, egg yolks, mustard and cream in a clean bowl.
Add the slow-cooked onions to the egg mixture, then spoon the mixture into the cooked tart case. Transfer to the oven to bake for 20-25 minutes, or until the filling is set and golden-brown.
For the bean salad, place all of the beans and the chopped mint into a large clean bowl and mix to combine.
For the dressing, place the mustard, lemon juice and white wine vinegar into a clean bowl. Season, to taste, with salt and freshly ground black pepper and slowly pour in the oil, whisking constantly.
Pour the dressing over the bean mixture and mix well.
To serve, cut out four wedges of warm onion tart and place onto plates. Place a spoonful of bean salad alongside each.