How to specify optimistic-lock="false" on Property ?
Hi,
In previous version I think I was able to do this using something similar to:
mapping.Map(s => s.Value).SetAttribute("optimistic-lock", "false");
now I do not see the SetAttribute method, instead there is OptmisticLock(), but I assume that this means that whenever this property is dirty, the whole class version will increment. I want the opposite. How can I do this ?
I do not see the possibility to do the same on mapping.References(..) either, and this is also what I need.
How can I achieve both ?
thanks for any guidance
Łukasz Podolak
Support Staff 2 Posted by James Gregory on 06 Oct, 2010 11:22 AM
Not.OptimisticLock()
3 Posted by lukasz.podolak on 06 Oct, 2010 12:23 PM
thanks James,
That works for a simple property, however what about a component ?
I mean:
mapping.References(e => e.VersionedReference).ThereIsNo_OptimisticLock_Here ?
thanks
Łukasz
Support Staff 4 Posted by Paul Batum on 16 Oct, 2010 09:46 AM
Hi Łukasz,
I've implemented support for this. You can get it on my repository:
http://github.com/paulbatum/fluent-nhibernate/tree/dev
<http://github.com/paulbatum/fluent-nhibernate/tree/dev>It should be pulled
into the official trunk before long.
2010/10/6 Łukasz Podolak <
***@tenderapp.com<tender%***@tenderapp.com>
>
5 Posted by lukasz.podolak on 17 Oct, 2010 12:04 PM
Paul,
Many, many thanks for your efforts.
Support Staff 6 Posted by James Gregory on 17 Oct, 2010 01:04 PM
Pauls changes have been merged into the main master branch. Thanks.
2010/10/17 Łukasz Podolak <
***@tenderapp.com<tender%***@tenderapp.com>
>
7 Posted by Jason Reimer on 09 Feb, 2011 06:02 PM
This same issue seems to still exist on the one-to-many side of things, and generates the wrong xml for a bag (set/collection, etc) element if you use Optimistic.None(). Not.Optimistic is not support on the IOneToManyCollectionInstance or OneToManyPart. Is a fix for this in the works as well?