Hello for everyone!
I have the following (simplified) structure of classes:
Code:
public class Book{
String title;
@OneToMany
List<BookAuthor> bookAuthors
...
}
public class BookAuthor{
@ManyToOne
Book book;
@ManyToOne
Author author;
(Some additional fields)
}
public class Author{
String name;
@OneToMany
List<BookAuthor> bookAuthors;
}
My problem is how to annotation the classes and properties, to search a Book by its author names, something like "book.bookAuthors.autor.name:somename".
I have some extra fields in the association class (BookAuthors), so I can't use the @JoinTable annotation, instead, I have to instantiate the association class manually, in order to set these fields. Other similar queries (but in associations using @JoinTable) works normally, just putting the @IndexedEmbedded/@ContainedIn annotations on both sides.
How can I solve this?
I found some topics about the "includePaths" property of @IndexedEmbedded annotation, but this property does not exists in my version (3.1.1GA).
Thanks for any help!