[Symfony] Query many-to-many relation

Given an Entity Class:

Let’s say you want to query for all the items watched by a user. In your Item Repository:

Repositories are handy but actually, you could also do it without one. Let’s extend Item Entity:

And add getter:

Thanks to this solution, all you need to do in the controller is: