commit | a04b3973a674b9851a0a8ce3294556fa6a0aeed8 | [log] [tgz] |
---|---|---|
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | Sun Feb 23 07:07:42 2020 +0100 |
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | Sun Feb 23 07:07:42 2020 +0100 |
tree | 046906a74dbbf5a4e070e0df450dcd3ccbfec34e | |
parent | 0312ec75cdb4284ff55dbc5d310263d9d78111ea [diff] |
BookmarkResource: Add missing selection to authenticated bookmark list query. Change-Id: I965dba4ae0027e2a9f24836b16aa4614c713cca6
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 @@ 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 @@ bm = root.join(User_.visibleBookmarks); } + query.select(bm); bm.fetch(Bookmark_.owner, JoinType.LEFT); query.orderBy(cb.desc(bm.get(Bookmark_.date)));