Hi,

I want to add auditing support to some of the transaction tables in
the oracle database. The tables have the following columns for
auditing purposes
AddedOn
AddedBy
EditedOn
EditedBy

I have triggers setup on the table to insert records into the audit
table whenever a record is modified or created.

The trouble I have is with auditing deletes.

In oracle you can pass User information to the session using
dbms_session.set_context that I can then refer to in the  trigger for
deletes to determine the user.

Is there a way I can execute custom statements in NHibernate
I want to run the below code at the start of every transaction.
BEGIN DBMS_SESSION.SET_CONTEXT('audit_ctx', 'user', 'username');
END;


Thanks


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

Reply via email to