Heat oil in a large saucepan over medium heat. Add onions, carrot and celery and cook for 5 minutes or until soft. Add garlic and fry for a few seconds. Add tomato paste and fry for 30 seconds. Add red wine and reduce for 1 minute. Add bay leaves, lentils, tinned tomatoes, vegetable stock and passata. Stir to combine .
Reduce heat to low and cook, covered, stirring occasionally, for 45 minutes or until lentils are tender. Season to taste.
While the sauce is cooking, cook pasta in a large saucepan of boiling salted water until al dente. Drain.
Top spaghetti with bolognaise and sprinkle with pecorino.