Cut the onion into cubes and sauté in a frying pan over a low heat until it is caramelized (about 30 minutes, stirring occasionally).
Whisk the eggs until they are spongy.
Mix the milk with the corn flour, integrate well. It can be beaten for a few minutes so that it is well integrated.
Incorporate the eggs into the flour and milk mixture, integrate. Add the caramelized onion.
Incorporate cut cheese into cubes. Sprinkle with grated cheese on top
Brush with oil or vegetable spray a glass type Pirex container, and bring to the oven for about 40 minutes, until the inside is cooked. Let cool, and once cool cut into portions. (I added some poppy seeds)