Fix parent/sub community mapping

This commit is contained in:
Terry Brady
2015-10-28 15:00:36 -07:00
parent d69f00fe3e
commit 1367485564

View File

@@ -44,11 +44,11 @@ public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
joinColumns = {@JoinColumn(name = "parent_comm_id") },
inverseJoinColumns = {@JoinColumn(name = "child_comm_id") }
)
private List<Community> parentCommunities = new ArrayList<>();
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "parentCommunities")
private List<Community> subCommunities = new ArrayList<>();
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "subCommunities")
private List<Community> parentCommunities = new ArrayList<>();
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "communities", cascade = {CascadeType.PERSIST})
private List<Collection> collections = new ArrayList<>();