Persist fails when using JOINED Inheritance with batch_size > 1 and legacy ID generation

Description

I have two entity (Person and Employee) and Employee extends Person. Look this.

When I try to persist Employee entity the Person is persisted but the Employee is not persisted. Below is my persistence.xml:

If I remove the <property name="hibernate.jdbc.batch_size" value="50" /> or use normal ID generation (rather than the legacy generation algorithm) it works fine.

The below was noted in the logs.

Also noticed that if several entities are persisted in a transaction all but the final entity seem to be persisted correctly.

I'm attaching a reproducer

This issue was related in https://issues.jboss.org/browse/JBEAP-17539.

Environment

None

Status

Assignee

Unassigned

Reporter

Rhuan Henrique Silva

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure