I have a user class that has groups.
@Where(clause = "enabled = 1 and deleted = 0")
@Fetch(FetchMode.SUBSELECT)
public Set<Group> getGroups() {
return groups;
}
But when I try to perform some operation on Groupthat is already stored in the database and is not suitable for a sentence @Where, Hibernate simply ignores me.
Actually, @Wherethis is not my solution, but the solution I can find to overcome this (create another dao method to perform some operation) is so ugly.
So, is there a way to overcome this? Or am I missing something? Thanks for the help.
source
share