-->
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: Urgent - Question regarding VETO in Hibernate
PostPosted: Wed Aug 31, 2005 10:36 am 
Regular
Regular

Joined: Wed Jul 27, 2005 2:33 am
Posts: 118
Consider the following scenario:

Class A {

int someField;

Set objectsOfTypeB;

}

class B {

int someOtherField;

A objectOfTypeA;
}

Now, suppose i retrieve a object of type A containing NO child objects(i.e. empty set).

Then i update the 'someField' in object A. Also, i add a new object of type B in the set 'objectsOfTypeB'. I then save the object A.

Now, suppose in the onSave() lifecycle method of object B, i issue a VETO. My question is this:

- When i issue the VETO statement, the object B will NOT be saved
- Will the object A be updated in this case? i.e. will the change that i made to 'someField' in object A, be persisted in the database, i mean will Hibernate proceed further to save object A?

Thank you.


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.