Is it possible to use a collection attribute of one of my entities as the underlying data for an @DataModel in a bean?
For instance, say you have an entity
@Entity public class Library { @OneToMany private List<Book> books; public List<Book> getBooks() {return books;} }
And a bean:
@Name("libraryManager") public class LibraryManager { @In private Library library; }
I wanted to use the list of books in the Library object as a source of data for an @DataModel. Is there any way to do this directly, or I must resort to having a List<Book> attribute in the bean and manually synchronize changes with the library object.