I have the definition of mapped super class as this:
{code:java} @MappedSuperclass @Getter @Setter public abstract class AbstractCatalogEntity {
@Column( name = "CODE") private String code;
@Column( name = "NAME") private String name;
} {code}
However the generated class of static metamodel looks like:
{code:java} @Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor") @StaticMetamodel(AbstractCatalogEntity.class) public abstract class AbstractCatalogEntity_ extends com.cs.ifs.oxygen.common.persistence.entity.AbstractModelEntity_ {
} {code}
See, there is no generated attribute. If I mark any attribute in my class ` * AbstractCatalogEntity ` * with annotation ` * @Id ` * then I get this correct metamodel:
{code:java} @Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor") @StaticMetamodel(AbstractCatalogEntity.class) public abstract class AbstractCatalogEntity_ extends com.cs.ifs.oxygen.common.persistence.entity.AbstractModelEntity_ {
public static volatile SingularAttribute<AbstractCatalogEntity, String> code; public static volatile SingularAttribute<AbstractCatalogEntity, String> name;
public static final String CODE = "code"; public static final String NAME = "name";
} {code}
I cannot add the working annotation ` * @Id ` * , because we are using sequence generation unique in each entity. I don' y t see any constraint blocking the generation. Can you fix it? Note: I even tried to change it to inheritance as recommended [here|https://stackoverflow.com/questions/45685521/jpa-mappedsuperclass-and-jpametamodelentityprocessor], but without success. |
|