public virtual void EvictCollection(object value, CollectionType type) { IPersistentCollection pc; if (type.IsArrayType) { pc = Session.PersistenceContext.RemoveCollectionHolder(value); } else if (value is IPersistentCollection) { pc = (IPersistentCollection)value; } else { return; //EARLY EXIT! } IPersistentCollection collection = pc; if (collection.UnsetSession(Session)) { EvictCollection(collection); } }