unsaved-value="undefined" not working?

20 views
Skip to first unread message

Steven

unread,
Oct 17, 2012, 12:05:54 PM10/17/12
to fluent-n...@googlegroups.com
Hi,

I have a mapping with a timestamp column that get's set to null via a legacy process (that I can't touch) which later causes my app to error with the stale data exception.  I've tried to set my unsaved-value="undefined" but the generated update statement still tries to check for the Timestamp. I'm using FluentNHibernate v1.3.0.717

relevant map
    <id name="Id" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" unsaved-value="0">
      <column name="FTS_VENDOR_STORE_ID" />
      <generator class="sequence">
        <param name="sequence">Vendor_store</param>
      </generator>
    </id>
    <version name="TimeStamp" type="System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" unsaved-value="undefined">
      <column name="TIMESTAMP" />
    </version>

generated sql
WHERE FTS_VENDOR_STORE_ID       = :p45
AND TIMESTAMP                   = :p46;

Any help would be greatly appreciated. 

Reply all
Reply to author
Forward
0 new messages