Thanks Fabio,

I tried that and it works grat. Now I have a problem logging my
changes to db within the Event-Handlers I use...

I worte event handler for IPostInsertEventListener,
IPreDeleteEventListener  and for IPreUpdateEventListener. Every
Function called by the EventListeners try to insert an entity into the
database by calling evt.session.save( new ObjectLog(...) );
Example:

    public class CustomPreUpdateEventListener :
IPreUpdateEventListener {
        public bool OnPreUpdate( PreUpdateEvent evt ) {
            IEntity entity = evt.Entity as IEntity;
            if( entity != null && !( entity is ObjectLog ) )
                evt.session.Save( new
ObjectLog( entity.GetType().Name, entity.Id, "Update" ) );
            return false;
        }
    }

My problem: This works grat for the PreUpdateEvent. The PreDeleteEvent
and PostInsertEvent are fired (breakpoints hold) but there is nothing
saved to db. My Table for the ObjectLog-Entity is full with update
rows but doesn't show any insert or delete rows...

Thanks for any help :-)

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to