starwalk wrote:
Hi there,
I've encountered the same problem and downloaded NHibernate source code to debug. What I have found is that the real problem is in SqlString class - Append method does not append anything unfortunately. So when on previous statement ID property is appended - it works because Append is called on SqlStringBuilder, but when Version is added - it uses SqlString.Append... which doesn't work.
Same problem here:
Oracle 10g, select-before-update, version. Since I'm using ActiveRecord from Castle project, I cannot switch to NH 2.0.
I downloaded the NH 1.2 sources made two small changes and it seems to work. I don't have enough time to submit a fix, but you can do it by yourself.
Simply download the 1.2 from
https://nhibernate.svn.sourceforge.net/ ... s/1.2.0.GA, and edit the file:
/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs:
line ~1538, remove the if (isVersioned) with its body,
line ~2353, remove the if (isVersioned) with its body.
Recompile. Done.
WARNING:
It's a quickfixk and I am NOT sure if it doesn't break some other functionality.