In our SQL Server 2005 db tables we use columns "Create" and "Change" of datatype "Datetime" to keep track of "Inserts" and "Updates" to a row.
We have defined triggers to populate these columns. Insert a new row - "Create" gets a current timestamp. Update a row and "Change" gets updated to current timestamp.
From everything I have read on this forum and my own experiments with NH suggests - it is not possible to use NH implementing optimistic lock and rely on "Change" column to track the row version if its value is set by a trigger.
An orthogonal issue (
http://forum.hibernate.org/viewtopic.ph ... highlight=) was raised by another member where Sergey acknowledged a bug.
Has any reader come up with a way to work with "Change" datetime stamp being set by db trigger and use NH effectively?
Does the NH dev team intend to support this behavior?