Hi to all
He we migrated to the new version of hibernate in our project, the entity is annotated with inheritance type joined and has parent class AbstractGeneratedUUIDEntity, that has only ID generated and is mapped superclass
@MappedSuperclass public abstract class AbstractGeneratedEntity extends AbstractEntity.
@Entity @Inheritance(strategy = InheritanceType.JOINED) @AttributeOverride(name = AbstractGeneratedEntity .ID_NAME, column = @Column(name =ParentLink.PARENT_LINK_ID, length = 36)) public abstract class AbstractParentLink extends AbstractGeneratedUUIDEntity.
The class has 2 derived classes, ChildLink1, ChildLink2. these both are anotatated as entity and in the where condition there is some strange condition, with tables when abstractco7_1_ and when abstractco7_2_. these both are nonexisting tables.
and case when abstractco7_1_.cost_savings_area_link_id is not null then 1 when abstractco7_2_.cost_savings_area_link_id is not null then 2 when abstractco7_.cost_savings_area_link_id is not null then 0 end=2
which consist of nonexistent table and brings error ERROR [SqlExceptionHelper] user lacks privilege or object not found: the
ABSTRACTCO7_1_.COST_SAVINGS_AREA_LINK_ID
When i change it to Table_Per_Class inheritance everything starts to work.
Where is the problem?
when abstractco7_1_.parent_link_id is not null then 1 when abstractco7_2_.parent_link_id is not null then 2 when abstractco7_.parent_link_id is not null then 0
|