-->
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: GetDeletes of IPersistentCollection at Nhibernate 2.1
PostPosted: Thu Mar 11, 2010 7:54 pm 
Newbie

Joined: Thu Mar 11, 2010 7:27 pm
Posts: 1
This question is for Nhibernate 2.1
Recently I migrated our project from Nhibernate 2.0 to Nhibernate 2.1.
We used to use IPersistentCollection.CollectionSnapshot.Snapshot to list of deleted our objects
In new version of Nhibernate, GetDeletes of IPersistentCollection is the idea method for our scenario if I understand correctly,
but I don't know what's ICollectionPersister in our scenario. When I call this method, for our scenario, which parameter should I pass?

here is our old code snippet
IPersistentCollection AccessList = (IPersistentCollection)d.AccessList;

IList<Access> prevAccessList = new List<Access>();
if (AccessList.CollectionSnapshot.Snapshot != null)
{
prevAccessList = Enumerable.Cast<Access>(AccessList.CollectionSnapshot.Snapshot).ToList<Access>();

}
IList<Access> removedAccess = prevAccessList.Except<Access>(d.AccessList).ToList<Access>();

Can anybody help me?


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.