protected virtual bool VisitCollectionsBeforeSave(object entity, object id, object[] values, IType[] types, IEventSource source) { WrapVisitor visitor = new WrapVisitor(source); // substitutes into values by side-effect visitor.ProcessEntityPropertyValues(values, types); return(visitor.SubstitutionRequired); }
private bool WrapCollections(IEventSource session, IEntityPersister persister, IType[] types, object[] values) { if (persister.HasCollections) { // wrap up any new collections directly referenced by the object // or its components // NOTE: we need to do the wrap here even if its not "dirty", // because collections need wrapping but changes to _them_ // don't dirty the container. Also, for versioned data, we // need to wrap before calling searchForDirtyCollections WrapVisitor visitor = new WrapVisitor(session); // substitutes into values by side-effect visitor.ProcessEntityPropertyValues(values, types); return(visitor.SubstitutionRequired); } else { return(false); } }