Hello,
I have one problem persiting this two relations one-to-many :
Code:
public class Library {
//...
@OneToMany
public Map<BookPK, Book> getOwnerBooks() {
return ownerBooks;
}
@OneToMany
public Map<BookPK, Book> getCurrentBooks() {
return currentBooks;
}
//...
}
Hibernate create only one table for two relations with not nullable columns, and not is possible insert only one element for one relation. ( for example i only want insert one owner book).
I try set @Column(nullable=true) under @OneToMany but hibernate ignores this sentence.
Are possible create only one table for relation? or are possible set nullable relation ?
Thks!!
PD: Sorry for my bad English :S.