Symfony Doctrine | Set Limit/Offset of referenced table [closed]

Symfony Doctrine | Set Limit/Offset of referenced table [closed]

I have two tables, Users and Posts. Users is referencing to Posts (1 User has n Posts). When I get a user with my entity manager (for example in my controller), I get every post related to the user in an array. But I want to set an offset/limit of that posts list to get maybe just the last 50 posts. How can I achieve that?

Source: Symfony Questions

Leave a Reply

Your email address will not be published. Required fields are marked *