예제 #1
0
        public virtual void OnPostDelete(PostDeleteEvent evt)
        {
            var entityName = evt.Persister.EntityName;
            if (!VerCfg.EntCfg.IsVersioned(entityName)) return;

            var verSync = VerCfg.AuditProcessManager.Get(evt.Session);
            var workUnit = new DelWorkUnit(evt.Session, evt.Persister.EntityName, VerCfg,
                                            evt.Id, evt.Persister, evt.DeletedState);
            verSync.AddWorkUnit(workUnit);
            if (workUnit.ContainsWork())
            {
                GenerateBidirectionalCollectionChangeWorkUnits(verSync, evt.Persister, entityName, null,
                                                                    evt.DeletedState, evt.Session);
            }
        }
예제 #2
0
        public void OnPostDelete(PostDeleteEvent evt)
        {
            String entityName = evt.Persister.EntityName;

            if (verCfg.EntCfg.IsVersioned(entityName)) {
                AuditSync verSync = verCfg.AuditSyncManager.get(evt.Session);

                IAuditWorkUnit workUnit = new DelWorkUnit(evt.Session, evt.Persister.EntityName, verCfg,
                        evt.Id, evt.Persister, evt.DeletedState);
                verSync.AddWorkUnit(workUnit);

                if (workUnit.ContainsWork()) {
                    GenerateBidirectionalCollectionChangeWorkUnits(verSync, evt.Persister, entityName, null,
                            evt.DeletedState, evt.Session);
                }
            }
        }