Example #1
0
 private void MarkInterceptorDirty(object entity, IEntityPersister persister, IEventSource source)
 {
     if (FieldInterceptionHelper.IsInstrumented(entity))
     {
         IFieldInterceptor interceptor = FieldInterceptionHelper.InjectFieldInterceptor(entity, persister.EntityName, persister.GetMappedClass(source.EntityMode), null, null, source);
         interceptor.MarkDirty();
     }
 }
Example #2
0
 public override void AfterInitialize(object entity, bool lazyPropertiesAreUnfetched, ISessionImplementor session)
 {
     if (IsInstrumented && (EntityMetamodel.HasLazyProperties || EntityMetamodel.HasUnwrapProxyForProperties))
     {
         HashSet <string> lazyProps = lazyPropertiesAreUnfetched && EntityMetamodel.HasLazyProperties ? new HashSet <string>(lazyPropertyNames) : null;
         FieldInterceptionHelper.InjectFieldInterceptor(entity, EntityName, this.MappedClass, lazyProps, unwrapProxyPropertyNames, session);
     }
 }
 public override void AfterInitialize(object entity, bool lazyPropertiesAreUnfetched, ISessionImplementor session)
 {
     if (IsInstrumented)
     {
         HashedSet <string> lazyProps = lazyPropertiesAreUnfetched && EntityMetamodel.HasLazyProperties ? lazyPropertyNames : null;
         //TODO: if we support multiple fetch groups, we would need
         //      to clone the set of lazy properties!
         FieldInterceptionHelper.InjectFieldInterceptor(entity, EntityName, lazyProps, session);
     }
 }