-->
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: Change in Criteria.createAlias behaviour
PostPosted: Thu Sep 23, 2004 6:16 pm 
Newbie

Joined: Fri Sep 26, 2003 4:29 pm
Posts: 16
Hi,

not sure if this is the best forum for this message, but there isn't an obvious one. This is more an FYI message than a request for help.

I've just upgraded from v2.1.5 to 2.1.6 and my tests reported an error. I tracked it down to a change in behaviour with the Criteria.createAlias method. A change that I could not see mentioned in the change log or elsewhere.

It is regarding calling Criteria.createAlias with the same arguments multiple times (eg. trying to create an alias of the same name twice). With 2.1.5 the call proceeded, with 2.1.6 a HibernateException is thrown with the error "alias already defined: <alias name>.

Calling createAlias more than once with the same arguements was obviously a bug in my code, and
I've changed it. This is for sure better than relying on the createAlias method to ignore the second (and subsequent) call. So this is not a problem. But, I thought it might be of use to someone to note this change in behaviour.

Jonny


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.