Bring a pan of salted water to the boil,
then cook the potatoes for 8 mins until
just tender but not falling apart. Drain
and leave to steam-dry in the colander.
Meanwhile, heat the butter in a wide
pan. Stir in the onions, seasoning and
the thyme, then cover and cook for
8 mins until translucent and turning
golden. Peel and slice the apples, toss
with the lemon juice, then cook with
the onions in the now uncovered pan for 5 mins, stirring often. Mix in the potatoes,
then leave to cool. Remove the thyme.
Cut just under two-thirds of the pastry
from the block, squash into a round, then
roll out on a flour-dusted surface until
large enough to line a deep 23cm
loose-bottomed tart tin, leaving a little
excess overhanging. Fill the pastry case
with layers of the potato and apple mix,
and all but 1 tbsp of the cheese. Dot
with the rest of the butter, if using,
and season generously. Brush the
overhanging edge of pastry with egg.
Heat oven to 190C/170C fan/gas 5 and
put a baking tray in the oven to heat up.
Shape the remaining pastry into
a round, then roll out until just large
enough to cover the top of the pie.
Press the edges together. Trim the pie
by pressing your thumb against the rim
of the tin all the way around. Brush with
egg, then cut slits to allow steam to
escape. Slide the pie onto the hot baking
sheet and cook for 1 hr, scattering with
the remaining. cheese with 10 mins to go,
until the pastry and cheese are golden.
Serve warm or eat cold with the pickled
cabbage or beets on the side.