Why does session-per-request prevent you from using a version property? You just need to propagate the version property down to your client so that when the user issues a change request, you can compare the current version of the entity with the version that the client initially retrieved. If they don't match, then you should raise a concurrency exception.
-cg On Dec 16, 11:25 am, Jacob Madsen <[email protected]> wrote: > Is there any other way or option without the version property. > Can nh compare state in the same transaction as the update? I have > session-per-request as mentioned before. > > On 16/12/2010, at 17.15, Fabio Maulo <[email protected]> wrote: > > > > > > > > > no, so far. > > btw you can map the version to a private field or a protected property. > > > -- > > Fabio Maulo > > > El 16/12/2010, a las 13:12, Jacob Madsen <[email protected]> escribió: > > >> Hi there, > > >> Is it possible to have a version column (I know it as optimistic- > >> lock="version" as attribute in class element) without a version > >> property included in the C# class definition? > > >> Right know my hbm property looks like: > > >> <version name="Version" type="System.Int64, mscorlib, Version=4.0.0.0, > >> Culture=neutral, PublicKeyToken=b77a5c561934e089"> > >> <column name="Version" /> > >> </version> > > >> I've read 10.4.3 athttp://nhforge.org/doc/nh/en/index.html and do > >> not see the option. > > >> I use session-per-request and do not have a single long running > >> ISession. > > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "nhusers" group. > >> To post to this group, send email to [email protected]. > >> To unsubscribe from this group, send email to > >> [email protected]. > >> For more options, visit this group > >> athttp://groups.google.com/group/nhusers?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "nhusers" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/nhusers?hl=en. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
