Preheat the oven at 350C.
In a hot pan, pour some olive oil and cook the sliced onion for 40 minutes on low until caramelized. Set aside.
In a hot pan, char the cubed ham for 3-4 minutes. Set aside.
In a rectangular baking dish (12 x 16), spread the caramelized onion and ham.
Peel the potatoes, rince them and slice them thinly with a sharp nice or a mandoline.
Place the potatoes in rows and layers until you all of it are used.
In a bowl, pour the milk and cream. Add salt, pepper and nutmeg to taste. Stir.
Pour over the potatoes. Sprinkle the cheese.
Place the dish in the oven and cook for 40 minutes.
Put a knife though the potatoes to make sure it's cooked. It's ready!