This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm sure about how you guys thinking about this, but
Mindscape.LightSpeed.Model.TypeModel.GetVersion(Entity entity) in \Src\Framework\Model\TypeModel.cs:line 960 is throwing a System.NullReferenceException when _lockVersionFieldModel.GetValue(entity) is null since trying to cast it directly to (int) instead of: </p><p> public int GetVersion(Entity entity) what about something like this (i'm not sure it will work 100% for you guys) instead </p><p> public int GetVersion(Entity entity) |
|
|
Btw: the forum should support code pasting... |
|
|
This suggestions is giving another failed... --- Mindscape.LightSpeed.OptimisticConcurrencyException An optimistic concurrency violation was detected while attempting update or delete of table --- Without the source code it would be hard to "debug" |
|
|
If setting LockVersion to DEFAULT '0' NOT NULL it will work without any changes in the code. Perhaps this is allready required, but I could not find it in the documentation or maybe my RTFM is not good enough :-) |
|
|
The LockVersion column should indeed be non-nullable (because a row should always have a definite version, not a "don't know" which is what NULL would imply). We will try to improve the documentation to make this more explicit and discoverable -- thanks for the feedback. |
|
|
I wrote this post 16jan. After testing, reading and testing and buying the source I have come to the conclusion that it is not a bug, but hard to find the "best practice" directly in the documentation.
|
|
|
I have made some updates to the documentation which I hope will make this clearer and more discoverable in future releases. Thanks for the feedback! |
|