Rub margarine with flour, and an egg and water. Knead dough, shape a ball and chill.
Roll the dough, place in the greased mold, make a fork-score onto the surface. Line the pie with greaseproof paper fitting to diameter of the form, place pie press atop. Bake in the oven at 220 °C for 10 minutes, transfer the press and paper and keep baking until golden crust.
Slice bacon and mushrooms and sauté with chopped onion, salt, pepper and add thyme.
In the baked cake place a bacon layer, next mushrooms with onion, cover with the mix of eggs and milk.
Sprinkle with cheese and bake until done.