-->
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: How to handle collections offline
PostPosted: Tue Oct 18, 2005 2:25 am 
Newbie

Joined: Tue Oct 04, 2005 3:27 pm
Posts: 3
Hi

I have to following problem and as I'm new to NHibernate I'm interested for the right approach.
I have an entity that has one-to-many ralation defined as Bag. In my winforms app i load the entity when I create the form and close the session. Then I do modifications to the collection of the entity and need to store it back in the database. Here is my problem. The Parent is already saved but when I closed the session it becomes transient. The child has a reference - not-null to the parent, invers is set to true. I do saveorupdate on the parent object and i get - "not-null property references a null or transient value:" which states that the problem is the reference to the parent in the child object.

I'll be very glad if you can help me because I'm really pressed with the time so no time to searchfor a good solution.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 18, 2005 3:16 am 
Newbie

Joined: Tue Oct 04, 2005 3:27 pm
Posts: 3
Hi

I'm sorry for my bothering you. I found the problem and it is in the way I'm adding new items. It was incorrect, because I didn't set the reference :oops:

Once again sorry.


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.