I first thought its a Spring Data issue but I was wrong. (see https://jira.spring.io/browse/DATAJPA-1146)
I have an entity hierarchy with single table inheritance. Base Class is "Carrier.java". The table is called "carrierjpa". The failing method tries to update a property but only for a special subtype.
This fails and generates a wrong a sql like
So I think carrier0_ must be omitted here or added after carrierjpa
The 4.2 branch is no longer being actively maintained and therefore it'd be helpful if you could see if the problem continues to persist on 5.x.
I found it in our older Jboss 7.1.x application were we can not update the Hibernate Version.
So I just created a Spring Boot app with our class hierarchy to test this with other versions:
Tested it with:
Spring Boot 1.3.5.RELEASE --> Hibernate 4.3.11
Spring Boot 1.5.4.RELEASE --> Hibernate 5.0.12
Spring Boot 2.0.0.M2 ---> Hibernate 5.2.11
It fails on all version with the message:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'carrier0_.ctype' in 'where clause'
So it seams the issue exists also in newer versions...
thanks for checking, that will be super helpful.