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: WCF and NHibernate - problem deleting items from collection
PostPosted: Wed May 28, 2008 1:18 am 
Newbie

Joined: Wed May 28, 2008 12:58 am
Posts: 3
Location: San Diego
I'm using NHibernate 1.2.1.4000 with WCF (.Net 3.0) and having some problems with object graphs sent from the client back to the server.

The serialization from the server to the client works fine, including object graphs with parent/child references (parent with collection of children, each child with a reference back to the parent).

The problem occurs when I delete an item from a collection (IList) with children and pass that back to the server. The server receives the object graph with correct number of items in the collection (i.e. without the deleted one), but the item is not deleted from the dB. My guess is that the serialization 'removes' NHibernate specific information which is required to delete the item from the collection.

I hope there are some workarounds available for the serialization to work in such a way that the NHibernate specifics are kept. The client will 'always' be C# so that should open up a few options.

Any suggestions are most welcome!


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 30, 2008 2:03 am 
Newbie

Joined: Wed May 28, 2008 12:58 am
Posts: 3
Location: San Diego
I figured out a solution from expanding on the concept addressed in http://davybrion.com/blog/2008/01/sendi ... -wcf-wire/


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.