summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java b/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java
index 8f25254..ebed4e2 100644
--- a/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java
+++ b/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java
@@ -44,7 +44,12 @@ public class WikiResource {
@Produces(TEXT_HTML)
public TemplateInstance getPage(@PathParam("pageName") String pageName) {
Optional<WikiPageRevision> maybePage =
- WikiPageRevision.find("title = ?1", Sort.by("date").descending(), pageName)
+ WikiPageRevision.find(
+ "from WikiPageRevision rev"
+ + " join fetch rev.author"
+ + " where rev.title = ?1",
+ Sort.by("date").descending(),
+ pageName)
.firstResultOptional();
if (maybePage.isEmpty()) {
throw new NotFoundException();