You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Querying a bean with a Many to Many relationship and sorting on that relationship should not duplicate returned list. I am not sure if sorting by many to many relationship is a supported scenario.
Activity
rbygrave commentedon Jun 26, 2024
This case is where the query is sorting by many to many AND not fetching that many to many. So when we look at the SQL we see:
... but as the M2M "roles" are not fetched the order by (and joins that are required to support the order by) is very academic.
That is, for the query:
... the orderBy does not actually have utility value. The orderBy is useful when the query also includes a
.fetch("roles").Options:
So the options for a query with an orderBy() on a M2M relationship but with no associated fetch of the M2M.
Hmm.