Support use of JOINED inheritance super table columns in SET clause

Description

Consider the following entities:

If I execute the following HQL query:

The SQL below is generated by Hibernate;

This query fails, because the join with the parent class is missing on the update clause. A very simple test case is attached.

Environment

Spring boot 2.3.5.RELEASE with JDK 15.0.1

Activity

Show:
Christian Beikov
November 11, 2020, 6:39 PM
Edited

Could you try setting the hibernate.query.omit_join_of_superclass_tables property to false and let me know if that fixes your issue?

Christian Beikov
November 12, 2020, 9:41 AM

Ok, I just checked this out and this is simply not supported yet. This requires support for joins in the DML statement which might come in Hibernate 6.0

Christian Beikov
November 12, 2020, 11:28 AM

H2 supports the MERGE statement which could be used to implement this.

Assignee

Christian Beikov

Reporter

Lucas Noetzold

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure