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?
|