| Steve, I just realized the test case I ran within JBoss was slightly different than the one posted here. I did not specify an AccessType on my entity, and appearently it defaulted to AccessType.FIELD. Also, my error message was different: java.sql.SQLException: Invalid column index I can replicate that error message with the attached test case when annotating class B with @Access(AccessType.FIELD). This might explain, why you were not able to verify that the code worked with older versions of hibernate, it might only have worked with AccessType.FIELD. Luckily, your fix solves both cases, with Hibernate 5.0.9 the test case succeeds with both AccessTypes. Now my only problem is that I cannot get Hibernate 5 to work within JBoss 7 (class mismatches during startup prevent UserTypes from being applied...). |