From 0c1536469d7e3e286bd72df8e09ac7e4a7a0c4ae Mon Sep 17 00:00:00 2001
From: Matthias Andreas Benkard <code@mail.matthias.benkard.de>
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(-)

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<String> openids;
+  public Set<String> openids;
 
   @OneToMany(mappedBy = "user", fetch = FetchType.LAZY)
   public Collection<PageKey> pageKeys;
@@ -77,12 +77,12 @@ public class User extends PanacheEntityBase {
       schema = "benki",
       joinColumns = @JoinColumn(name = "user"))
   @Column(name = "email")
-  public Collection<String> emailAddresses;
+  public Set<String> emailAddresses;
 
   @ElementCollection(fetch = FetchType.LAZY)
   @CollectionTable(name = "user_jids", schema = "benki", joinColumns = @JoinColumn(name = "user"))
   @Column(name = "jid")
-  public Collection<String> jids;
+  public Set<String> 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<String> nicknames;
+  public Set<String> nicknames;
 
   @OneToMany(mappedBy = "user", fetch = FetchType.LAZY)
   public Collection<UserRole> 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<String> webids;
+  public Set<String> webids;
 
   @OneToMany(mappedBy = "author", fetch = FetchType.LAZY)
   public Collection<WikiPageRevision> wikiPageRevisions;
-- 
cgit v1.2.3