I need help to solve some task about Doctrine Relation Table.
I have two entities:
PropertyGroup
- ID
- Name
Property
- ID
- Name
This entities have a custom Many To Many relation table with extra column
PropertyAndGroupRel
- ID
- PropertyGroupId
- PropertyId
- SortKey
How can I select PropertyGroup with QueryBuilder or NativeQuery with using LIMIT and OFFSET in this view:
{ { // PropertyGroup id: 1, name: 'XXX', properties: { // Properties Collection { id: 11, sortKey: 1 // SORT KEY FROM PROPERTY_AND_GROUP_REL, name: 'XXX' }, ... } } ...}
Thanks in advance!)