|
I've got a wierd one here...we've developed our domain model to use a version column (int) with the NHibernate <version> mapping and all works beautifully.
Now, however, we have the requirement to add a timestamp to our objects so we know when they were last updated. The problem is that we need the database to add the timestamp rather than the client where NHibernate is running as we need to make sure that the date/times stored are consistent.
I was thinking of using the <timestamp> mapping but we don't want to change our domain objects from having a version property that is managed by NHibernate as we have an external dependency on those version properties. It looks like it's not possible to use both <timestamp> and <version> in the same class, so I think that's out.
Is there any other solution to this?
Cheers,
Symon.
|