From a04b3973a674b9851a0a8ce3294556fa6a0aeed8 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 23 Feb 2020 07:07:42 +0100 Subject: BookmarkResource: Add missing selection to authenticated bookmark list query. Change-Id: I965dba4ae0027e2a9f24836b16aa4614c713cca6 --- src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main/java/eu') 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 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))); -- cgit v1.2.3