summaryrefslogtreecommitdiff
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-01-27 06:29:07 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-01-27 06:29:31 +0100
commit4ad837d587db9bb2b52a617ce4804c3be7b74e02 (patch)
treec379cc6639eaa0e1ad94802efc3a8183ef81b91a /src/main/java/eu
parentd50bbb75b8018be054b840cbae6b8e0c48b514ea (diff)
JPA: Make all many-to-many collections sets.
This improves performance when inserting new elements. Change-Id: I7c85d893984deb9ac4ba93ea34075c589a27e82e
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/mulk/mulkcms2/benki/accesscontrol/Role.java2
-rw-r--r--src/main/java/eu/mulk/mulkcms2/benki/users/User.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/accesscontrol/Role.java b/src/main/java/eu/mulk/mulkcms2/benki/accesscontrol/Role.java
index b3efeb9..7c0db71 100644
--- a/src/main/java/eu/mulk/mulkcms2/benki/accesscontrol/Role.java
+++ b/src/main/java/eu/mulk/mulkcms2/benki/accesscontrol/Role.java
@@ -69,7 +69,7 @@ public class Role extends PanacheEntityBase {
public User owningUsers;
@ManyToMany(mappedBy = "effectiveRoles", fetch = FetchType.LAZY)
- public Collection<User> effectiveUsers;
+ public Set<User> effectiveUsers;
@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name = "role_tags", schema = "benki", joinColumns = @JoinColumn(name = "role"))
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 72a63f6..3e6559c 100644
--- a/src/main/java/eu/mulk/mulkcms2/benki/users/User.java
+++ b/src/main/java/eu/mulk/mulkcms2/benki/users/User.java
@@ -111,7 +111,7 @@ public class User extends PanacheEntityBase {
public Collection<WikiPageRevision> wikiPageRevisions;
@ManyToMany(mappedBy = "visibleTo", fetch = FetchType.LAZY)
- public Collection<Post> visiblePosts;
+ public Set<Post> visiblePosts;
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(