From a412b5a67fd49c2bb977573bd256b38153a531c3 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 19 Jan 2020 18:49:33 +0100 Subject: Category: Add #articles mapping. Change-Id: Iac78840f98950fc9d79bbbc802baf4ecc961f8b4 --- src/main/java/eu/mulk/mulkcms2/pages/Category.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main') diff --git a/src/main/java/eu/mulk/mulkcms2/pages/Category.java b/src/main/java/eu/mulk/mulkcms2/pages/Category.java index 06e2429..31a9db7 100644 --- a/src/main/java/eu/mulk/mulkcms2/pages/Category.java +++ b/src/main/java/eu/mulk/mulkcms2/pages/Category.java @@ -31,4 +31,7 @@ public class Category extends PanacheEntityBase { @ManyToMany(mappedBy = "supercategories", fetch = FetchType.LAZY) public Set subcategories; + + @ManyToMany(fetch = FetchType.LAZY, mappedBy = "categories") + public Set
articles; } -- cgit v1.2.3