Entities in joined subclass table are not inserted with batch size > 0 using sequence-identity ID generator

Description

While trying to migrate to Hibernate 5.2.18 I observed a change in behavior for Joined table while using a batch size > 0.

Attached a simple test case with two entities, Resource, the parent, and FolderResource, the child.
The record in the child table is not inserted.
With Hibernate <= 5.2.14 the test case is ok (even with batch size > 0).
With Hibernate > 5.2.14 the test case fails if the batch size > 0, while it succeed with batch size = 0.
In the second case, the log shows this line:

INFO AbstractBatchImpl:201 - HHH000010: On release of batch it still contained JDBC statements

that is not present for Hibernate <= 5.2.14

As for HHH-13355, it is possible that this regression has been introduced in version 5.2.15, issues HHH-2558/HHH-5797 introduced changes in this regard.

Environment

None

Activity

Show:
Gail Badner
November 16, 2019, 12:14 AM

Batch inserts should be disabled when using a sequence-identity ID generator.

Assignee

Gail Badner

Reporter

Marco Caboni

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.2.14

Components

Affects versions

Priority

Major
Configure