Cook the spaghetti in plenty of salted water according to package directions until al dente. Peel the onion and garlic clove, dice finely and sauté in the butter.
Add the peas, steam for about 5 minutes.
Season with salt, pepper and sugar. Preheat the oven to 200° (convection oven 180°). Cut the ham into short narrow strips. Rinse the chives, shake dry and cut into fine rolls.
Drain the spaghetti, mix with peas, ham and chives and place in a greased baking dish. Beat the eggs with milk and cream, season with salt and pepper. Mix in the Parmesan cheese. Spread evenly over the pasta and bake the casserole for 20-25 minutes.