- Lists also can be the inverse side of bidirectional one-to-many relationships

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18204 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Adam Warski 2009-12-11 07:43:34 +00:00
parent 04fae574ae
commit edd5bed074
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ public final class CollectionMetadataGenerator {
void addCollection() {
Type type = propertyValue.getType();
if ((type instanceof BagType || type instanceof SetType || type instanceof MapType) &&
if ((type instanceof BagType || type instanceof SetType || type instanceof MapType || type instanceof ListType) &&
(propertyValue.getElement() instanceof OneToMany) && (propertyValue.isInverse())) {
// A one-to-many relation mapped using @ManyToOne and @OneToMany(mappedBy="...")
addOneToManyAttached();