I have a projection for my entity and I need to sort it by field of inner class. This is part of my entities:
class Person {
UUID guid;
Set<DisabilityHistory> disabilityHistory;
}
class DisabilityHistory {
Date createdDate;
}
I know about sort param but request like api/person/search?projection=myProjection&sort=disabilityHistory.createdDate,asc doesn't work. The only solution I have found is using @OrderBy annotation in my entity but in this case it will sorted always and I worried about performance.