From 0c1536469d7e3e286bd72df8e09ac7e4a7a0c4ae Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 27 Jan 2020 06:29:51 +0100 Subject: JPA: Make all element collections sets. Change-Id: I01360f982259608ba214e360d3189ac43ba59966 --- src/main/java/eu/mulk/mulkcms2/benki/users/User.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main') diff --git a/src/main/java/eu/mulk/mulkcms2/benki/users/User.java b/src/main/java/eu/mulk/mulkcms2/benki/users/User.java index 3e6559c..c1ab89b 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/users/User.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/users/User.java @@ -60,7 +60,7 @@ public class User extends PanacheEntityBase { @ElementCollection(fetch = FetchType.LAZY) @CollectionTable(name = "openids", schema = "benki", joinColumns = @JoinColumn(name = "user")) @Column(name = "openid") - public Collection openids; + public Set openids; @OneToMany(mappedBy = "user", fetch = FetchType.LAZY) public Collection pageKeys; @@ -77,12 +77,12 @@ public class User extends PanacheEntityBase { schema = "benki", joinColumns = @JoinColumn(name = "user")) @Column(name = "email") - public Collection emailAddresses; + public Set emailAddresses; @ElementCollection(fetch = FetchType.LAZY) @CollectionTable(name = "user_jids", schema = "benki", joinColumns = @JoinColumn(name = "user")) @Column(name = "jid") - public Collection jids; + public Set jids; @ElementCollection(fetch = FetchType.LAZY) @CollectionTable( @@ -90,7 +90,7 @@ public class User extends PanacheEntityBase { schema = "benki", joinColumns = @JoinColumn(name = "user")) @Column(name = "nickname") - public Collection nicknames; + public Set nicknames; @OneToMany(mappedBy = "user", fetch = FetchType.LAZY) public Collection directRoles; @@ -105,7 +105,7 @@ public class User extends PanacheEntityBase { @ElementCollection(fetch = FetchType.LAZY) @CollectionTable(name = "webids", schema = "benki", joinColumns = @JoinColumn(name = "user")) @Column(name = "webid") - public Collection webids; + public Set webids; @OneToMany(mappedBy = "author", fetch = FetchType.LAZY) public Collection wikiPageRevisions; -- cgit v1.2.3