-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem updating version in JoinSubclassEntityPersister-NPE
PostPosted: Wed Sep 22, 2010 7:43 am 
Newbie

Joined: Fri Dec 21, 2007 10:20 am
Posts: 5
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.