De-generics-ize Post, PostText.
Hibernate 6 did not like the old scheme.
Change-Id: I060e077648ab54589d5b7574137c10517b4c4114
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/posts/PostText.java b/src/main/java/eu/mulk/mulkcms2/benki/posts/PostText.java
index dc7a228..d25615e 100644
--- a/src/main/java/eu/mulk/mulkcms2/benki/posts/PostText.java
+++ b/src/main/java/eu/mulk/mulkcms2/benki/posts/PostText.java
@@ -27,7 +27,7 @@
@Table(name = "post_texts", schema = "benki")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@IdClass(PostTextPK.class)
-public abstract class PostText<OwningPost extends Post<?>> extends PanacheEntityBase {
+public abstract class PostText extends PanacheEntityBase {
private static final int DESCRIPTION_CACHE_VERSION = 1;
@@ -52,10 +52,14 @@
@Type(value = PostgreSQLTSVectorType.class)
public String searchTerms;
- @ManyToOne(fetch = FetchType.LAZY, targetEntity = Post.class)
+ @ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "post", referencedColumnName = "id", nullable = false)
@JsonbTransient
- public OwningPost post;
+ public Post post;
+
+ public Post getPost() {
+ return post;
+ }
@CheckForNull
public final String getDescriptionHtml() {