Order doesn’t use this joins.
That’s expected, your “workaround” is the proper way to use the explicit join.
But there is a problem with spring data repositories, which does’t use joins in orders, it create sorting path like root.get.get….
That’s unfortunate, I guess the entity graph isn’t applied correctly then. A possible workaround for now could be to do the sorting manually for such cases. |