I have the definition of mapped super class as this:
@MappedSuperclass
@Getter
@Setter
public abstract class AbstractCatalogEntity {
@Column( name = "CODE")
private String code;
@Column( name = "NAME")
private String name;
}
However the generated class of static metamodel looks like:
@Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor")
@StaticMetamodel(AbstractCatalogEntity.class)
public abstract class AbstractCatalogEntity_ extends com.cs.ifs.oxygen.common.persistence.entity.AbstractModelEntity_ {
}
See, there is no generated attribute. If I mark any attribute in my class `AbstractCatalogEntity ` with annotation `@Id` then I get this correct metamodel:
@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";
}
I cannot add the working annotation `@Id`, because we are using sequence generation unique in each entity. I don'y see any constraint blocking the generation. Can you fix it? |