Skip to content

Commit

Permalink
Fixed issue where keywords would be duplicated, #188
Browse files Browse the repository at this point in the history
  • Loading branch information
Willem Elbers committed Oct 3, 2024
1 parent 8b7709f commit c178771
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> keywords;

@OneToMany(cascade = CascadeType.ALL,
Expand Down

0 comments on commit c178771

Please sign in to comment.