-->
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.  [ 3 posts ] 
Author Message
 Post subject: Wrong parameter order?
PostPosted: Sun Jan 11, 2004 11:03 pm 
Newbie

Joined: Fri Dec 05, 2003 12:44 am
Posts: 16
Hello,

I've been tracing through the code related to Interceptors and I just came across what looks like a typo bug in the code.

In SessionImpl.flushEntities() there is a line (2395 in my copy of the source)

Code:
dirtyProperties = persister.findModified(values, currentPersistentState, object, this);


shouldnt it be?

Code:
dirtyProperties = persister.findModified(currentPersistentState,  values, object, this);


Or have a missed something?

Thanks

Ollie


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 11, 2004 11:08 pm 
Newbie

Joined: Fri Dec 05, 2003 12:44 am
Posts: 16
Sorry should have included some context.

Code:
if ( !entry.isBeingReplicated ) {
            //give the Interceptor a chance to modify property values
            final boolean intercepted = interceptor.onFlushDirty(
               object, entry.id, values, entry.loadedState, persister.getPropertyNames(), types
            );
            //now we might need to recalculate the dirtyProperties array
            if (intercepted && !cannotDirtyCheck && !interceptorHandledDirtyCheck) {
               if (dirtyCheckDoneBySelect) {
                  dirtyProperties = persister.findModified(values, currentPersistentState, object, this); // <---- problem?
               }
               else {
                  dirtyProperties = persister.findDirty(values, entry.loadedState, object, this);
               }
            }
            //if the properties were modified by the Interceptor, we need to set them back to the object
            substitute = substitute || intercepted;
         }


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2004 1:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Thanks, fixed it (fairly obscure case).


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

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.