NHibernate and mysql timestamp

Posted by HeavyWave on Stack Overflow See other posts from Stack Overflow or by HeavyWave
Published on 2010-04-03T14:43:11Z Indexed on 2010/04/03 14:53 UTC
Read the original article Hit count: 474

I am trying to do versioning with NHibernate and everything works fine, however right after the insert NHibernate tries to pull the generated timestamp by executing the following query:

SELECT profileloc_.Updated as Updated14_ FROM profile_locale profileloc_ 
WHERE profileloc_.id=?p0 and profileloc_.culture=?p1;?p0 = 16, ?p1 = 1033

Which is totally wrong, as it will pull out all versions starting with the first one.

How do I make it add ORDER BY Updated DESC to this query? I am using Fluent NHibernate for mappings.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about nhibernate