@Table(Inverse=true) ignored for SecondaryTables in JoinedSubclassEntityPersister

Description

From the documentation:

However, with a simple mapping:

An insert query for discount_code_uses is still executed for every persist. My entity is part of an inheritance tree using @Inheritance(JOINED) which may contribute to the problem.

Environment

None

Activity

Show:
Jan-Willem Gmelig Meyling
June 10, 2018, 11:38 AM

After some investigation I found out that Join#isInverse() is only handled in the SingleTableEntityPersister, and not the UnionSubclassPersister or JoinedSubclassPersister. So this issue is related to the used inheritance strategy. I'll change the title accordingly.

Jan-Willem Gmelig Meyling
June 10, 2018, 3:01 PM

I have submitted a pull request for supporting inverse secondary tables on the JoinedSubclassEntityPersister. While trying to apply these changes to the UnionSubclassPersister as well, I found out that SecondaryTables are not supported there altogether, for which I've created a separate issue ().

Assignee

Jan-Willem Gmelig Meyling

Reporter

Jan-Willem Gmelig Meyling

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Affects versions

Priority

Minor
Configure