I'm new to Hibernate Search. I've a manyToMany relation and want to perform search. They are defined in 3 tables - Person, Role, PersonRoles. Where do I use the @IndexedEmbedded and @ContainedIn annotations if I want to search by role and get a list of persons?
Person @OneToMany(mappedBy="person",fetch=FetchType.LAZY) private Set roles;Role @OneToMany(mappedBy="role",fetch=FetchType.LAZY) private Set persons;PersonRole @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="PERSON_ID") private Person person;
@ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="ROLE_ID") private Role role;
|