summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-02-23 07:07:42 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-02-23 07:07:42 +0100
commita04b3973a674b9851a0a8ce3294556fa6a0aeed8 (patch)
tree046906a74dbbf5a4e070e0df450dcd3ccbfec34e /src/main
parent0312ec75cdb4284ff55dbc5d310263d9d78111ea (diff)
BookmarkResource: Add missing selection to authenticated bookmark list query.
Change-Id: I965dba4ae0027e2a9f24836b16aa4614c713cca6
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java b/src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java
index 12abb2b..1c6653a 100644
--- a/src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java
+++ b/src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java
@@ -275,8 +275,6 @@ public class BookmarkResource {
From<?, Bookmark> bm;
if (identity.isAnonymous()) {
bm = query.from(Bookmark.class);
- query.select(bm);
-
var target = bm.join(Bookmark_.targets);
query.where(cb.equal(target, Role.getWorld()));
} else {
@@ -288,6 +286,7 @@ public class BookmarkResource {
bm = root.join(User_.visibleBookmarks);
}
+ query.select(bm);
bm.fetch(Bookmark_.owner, JoinType.LEFT);
query.orderBy(cb.desc(bm.get(Bookmark_.date)));