I am not sure that Spring data has anything to with it - after all it simply invokes EntityManager#save (as far as my debugging showed). Can you try setting up a simple persistence environment having the example setup I mentioned - i.e., a @MappedSuperclass with an abstract base @Entity with 2 sub-entities extending it using JOINED inheritance ?
Please attach a runnable testcase that works without spring data so that we can verify this and better understand why this is happening
I will try to generate a test case, but I am currently swamped for the near future and it would take some time to do it - setting up JPA environment is not trivial. I will try to debug it further (again, if I have some time). I will try it with HSQL (the failure occurs with PostgreSQL) - since this is something I can do much faster. This will rule out any database "idiosyncrasies" - I don't expect any surprises, but one never knows... |