Willem Borgesius (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYzNiMzY4M2U4...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-13940?atlOrigin=eyJpIjoiYzNiMz...
) HHH-13940 (
https://hibernate.atlassian.net/browse/HHH-13940?atlOrigin=eyJpIjoiYzNiMz...
) Hibernate session does not save subclass information correctly when using batch size
>0 and hibernate.discriminator.ignore_explicit_for_joined (
https://hibernate.atlassian.net/browse/HHH-13940?atlOrigin=eyJpIjoiYzNiMz...
)
Issue Type: Bug Affects Versions: 5.2.15, 5.2.16, 5.2.17, 5.2.18, 5.4.0, 5.4.9, 5.3.16
Assignee: Unassigned Attachments: hibernate-orm-5-ignore-explicit.zip Components:
hibernate-core Created: 08/Apr/2020 04:52 AM Priority: Major Reporter: Willem Borgesius (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
We have a use case to set the flag hibernate.discriminator.ignore_explicit_for_joined to
true. Unfortunately we have code we can't change that uses inconsistent
DiscriminatorValue's.
It seems that when hibernate.jdbc.batch_size is > 0 and
hibernate.discriminator.ignore_explicit_for_joined is true, the data for the a subclass of
InheritanceType.JOINED does not get saved.
I tried upgrading to 5.3.16.Final due to the fix of HHH-12968 (
https://hibernate.atlassian.net/browse/HHH-12968 ) Closed , but it did not solve my
problem.
Our codebase uses hibernate 5.2.18.Final, but i created a unit test within our application
to test over hibernate versions. It works as expected with hibernate 5.2.14.Final, and
seems to be fixed in 5.4.10.Final.
I added a testcase derived from the template, trying to isolate the problem as much as
possible.
The testcase passes with hibernate 5.4.10.Final and fails with versions between
5.2.18.Final and 5.4.10.Final.
The testcase also passes if either hibernate.discriminator.ignore_explicit_for_joined is
set to false or hibernate.jdbc.batch_size is set to 0.
Due to the fact we use some external code we unfortunately can't upgrade to hibernate
5.3. In our osgi module there is a bundle dependency on org.hibernate.core bundle and this
seems to have been moved to org.hibernate.orm.core).
(
https://hibernate.atlassian.net/browse/HHH-13940#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-13940#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100124- sha1:c13ca0d )