-->
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.  [ 2 posts ] 
Author Message
 Post subject: SaveorUpdate Method
PostPosted: Thu Sep 17, 2009 7:12 am 
Newbie

Joined: Thu Aug 27, 2009 6:28 am
Posts: 19
Hi,
I have two clarification
1.whether i should use all associated properties in my model. and What the UpdateModel() doing
behind the scene.
2. I got an below exception. What its says
"object references an unsaved transient instance - save the transient instance before flushing."

Thanks&Regards
Nizam

_________________
Thanks & Regards
Nizam Abdul


Top
 Profile  
 
 Post subject: Re: SaveorUpdate Method
PostPosted: Fri Sep 18, 2009 5:00 pm 
Newbie

Joined: Thu Sep 03, 2009 7:27 pm
Posts: 2
Hi,
I dont understand what do you mean with the first point, but regarding the second point:
From my experience that error is because you are trying to save an Entity that references another entity that is not saved yet in your DB.
So you have to either save that other Entity, or change your mappings so it updates in cascade.

Take a look at this site https://forum.hibernate.org/posting.php?mode=reply&f=25&t=999698
Gives an example from what i mentioned.

Hope i was of any help, regards.-


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