I'm with Fabio, this doesn't seem like a job for your persistence layer. I would view an audit log as business functionality. I'm starting work on my audit logging system, and I'm leaning towards a ChangeScope class that behaves somewhat like a TransactionScope and a simple helper method that I call in all of my property setters that adds an entry to this change scope. Obviously that's a lot of code, so I'm also looking at writing a Guidance Automation Package to handle a lot of the work of ensuring all properties have the audit log call in them, etc...
-Jon On Nov 24, 10:09 am, Stefan Steinegger <[EMAIL PROTECTED]> wrote: > I doubt that I'll be happy with Merge. Let's assume I have a complex > object graph to store, it is sent by the client to the server. I have > to store it and send it back. Assumed that many objects in the graph > are not stored by cascades, I have to store them separately. if I > would use Merge, I would get new instances of this objects and have to > *replace* them in the object graph. That's very bad. This produces at > least a lot of terrible code in the business logic. > > Isn't there _any_ possibility to work with NHibernate how it is > supposed to be used _and_ get the current value from the database? > > On 11 Nov., 15:03, "Fabio Maulo" <[EMAIL PROTECTED]> wrote: > > > > > Try using Merge. > > > -- > > Fabio Maulo- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
