Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
A simple entity or mapped superclass with a generic type parameter causes the metamodel generation to fail because of syntax errors, e.g.
@MappedSuperclass public abstract class MyEntity2<T extends MyEntity> implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue private Long id; private T myEntity;
causes the generation of
import java.lang.Long; import javax.persistence.metamodel.SingularAttribute; @javax.persistence.metamodel.StaticMetamodel (value=richtercloud.openjpa.generic.metamodel.MyEntity2.class) @javax.annotation.Generated (value="org.apache.openjpa.persistence.meta.AnnotationProcessor6",date="Sat Feb 03 20:59:32 CET 2018") public class MyEntity2_ { public static volatile SingularAttribute<MyEntity2,Long> id; public static volatile SingularAttribute<MyEntity2,T> myEntity; }
which is invalid because `T` isn't specified and thus unknown to the compiler.
A SSCCE is provided at https://gitlab.com/krichter/openjpa-generic-metamodel.
experienced with 3.0.0-SNAPSHOT