Skip to:
Given the following classes:
Executing the query: select count( h ) from Human h results in the following SQL:
select count( h ) from Human h
Note that:
idproperty0_.id is not the primary key column;
idproperty0_.id
Human does not have a property named id;
Human
id
count should be operating on the primary key, idproperty0_.realId.
count
idproperty0_.realId
The same select expression is generated using @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS).
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
When @Inheritance(strategy = InheritanceType.JOINED) is used, the generated SQL is:
@Inheritance(strategy = InheritanceType.JOINED)
In addition to using the wrong column, there is no table with alias idproperty0_1_.
idproperty0_1_
Pushed to master and 5.3 branches.
, , I can confirm this is needed in 5.1.
I may be wrong but I think this PR is really urgent for the 5.1.17 release but not for master.Anyway I think will take care of this one on Monday.
do we really need to have that committed to master soon? (Maybe it's required to have it in 5.1.x?)
I think we will have to release a CR2 due to the dependency issues with JAXB that Yoann fixed.
But I would prefer to keep it to the minimum if possible and move everything we can postpone to 5.4.1.
Given the following classes:
Executing the query:
select count( h ) from Human h
results in the following SQL:Note that:
idproperty0_.id
is not the primary key column;Human
does not have a property namedid
;count
should be operating on the primary key,idproperty0_.realId
.The same select expression is generated using
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
.When
@Inheritance(strategy = InheritanceType.JOINED)
is used, the generated SQL is:In addition to using the wrong column, there is no table with alias
idproperty0_1_
.