diff --git a/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/model/VirtualCollection.java b/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/model/VirtualCollection.java index d8c31c62..ef0edc3d 100644 --- a/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/model/VirtualCollection.java +++ b/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/model/VirtualCollection.java @@ -306,9 +306,9 @@ public static enum Problem { @Column(name = "reproducibility_notice", length = 8192) private String reproducibilityNotice; - @ElementCollection(fetch = FetchType.EAGER) - @CollectionTable(name = "keyword", - joinColumns = @JoinColumn(name="vc_id")) + //https://discourse.hibernate.org/t/elementcollection-on-hashmap-with-generics-returns-duplicates/6108/4 + @ElementCollection(fetch = FetchType.LAZY) //FetchType.EAGER results in duplicate keywords returned + @CollectionTable(name = "keyword", joinColumns = @JoinColumn(name="vc_id")) private List keywords; @OneToMany(cascade = CascadeType.ALL,