Hello,
I have a bean with a set and I put on this set @OrderBy
Code:
@OneToMany(mappedBy = "doc", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@Cascade( { org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
@OrderBy(clause="PERSON_NAME,ORG_NAME")
public Set<Sender> getSenders() {
return senders;
}
But I need to not have the order by for the search.
So have I to create two different bean to use it or is there a way like FetchProfile to keep a single Bean
Thanks in advance,
Jamila