-->
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.  [ 4 posts ] 
Author Message
 Post subject: Interceptor Interface
PostPosted: Mon Feb 09, 2004 1:28 pm 
Beginner
Beginner

Joined: Tue Jan 27, 2004 6:58 pm
Posts: 20
I've been playing around with the Interceptor interface, and first off just let me say this - nice job. I see a lot of poorly designed interfaces and this one is sweet.

Enough with the buttering up. Here is my question. Let's say that during the onLoad method I pulled some needed data from the "state" array, and then replaced that value with null. AND, I also nulled out the corresponding index in the propertyNames and types arrays. Would this result in Hibernate skipping over this data value (in essence "deleting" it from the data set) or would some type of exception be thrown?

Jonathan House


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 3:43 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
It depends upon the return value of the method. If you change the state array, you are supposed to return true, so that Hibernate knows to use the altered state.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 4:25 pm 
Beginner
Beginner

Joined: Tue Jan 27, 2004 6:58 pm
Posts: 20
So if I did null out a specific index of the state, propertyNames and types arrays and then returned a "true", indicating that the arrays had been modified, would Hibernate simply ignore the now nulled state, name and type trio?[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 6:02 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
no, it would update the in-memory and database state


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.