-->
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: many-to-one problem
PostPosted: Sun Sep 18, 2005 5:59 pm 
Newbie

Joined: Sun Sep 18, 2005 3:44 pm
Posts: 9
Hi!

I have a one to many relationship between PolicyCategory and Policy.
Class Group has a one to many relashionship to Policy.

I created some Value Objects and Assemblers so I can only load a Policy reference when I'm updating a Group. I don't want to get the full Policy object (including PolicyCategories) when I'm loading the Group.

Now, when I'm saving the Group object, I'm saving a collection of Policy references as well but because Policy instances are just references, the value object will have no PolicyCategories and the domain object will get a null PolicyCategory. At that time NHibernate does not save because PolicyCategory is null. But I never set PolicyCategory.

Thanks


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.