Hello,
Upon migrating my application to Hibernate 3.5.3 from 3.3.2.GA I'm getting an assertion error from a SQL string which is set to null. The problem lies in the update() method of AbstractEntityPersister (which is in fact a JoinSubclassEntityPersister). Let me explain.
The method is invoked with dirtyFields == null and hasDirtyCollection == true on a mutable entity. Upon introspection of the code, what seems to be the problem is that tableUpdateNeeded contains the names of all tables of this table-per-subclass mapped entity. As such when the updateStrings are generated at line 2788, the array is populated with a SQL string at the first index and null for the remaining array values.
Since the tableUpdateNeeded is true for all indexes, the updateOrInsert() method is invoked with a null SQL string and an assertion error occurs way later when the SQL string is returned by the interceptor. I was comparing the class with the version in 3.3.2.GA where it works a getUpdateStrings() was invoked rather than the buggy generateUpdateString().
It is impossible to provide my own entity persister to my knowledge so any help would be greatly appreciated or else I will need to migrate back to the old version.
Thanks for any help
Nicolas
|