Consider an entity
@Entity
class Book{
...
@ElementCollection(fetch = FetchType.EAGER)
List<String> tags = new ArrayList<String>();
...
}
What should be the hibernate query so one can get all the books containing any multiple tag "hobbit,sherlock,fiction"(OR operation splitted by comma).Any query(HQL,Criteria or raw SQL) will work,though Criteria is prefered.