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 would like to add optimistic concurrency to an existing LS2 model in order to take advantage of being able to update only changed columns in LS3 when I updgrade. From what I can see in the documentation and forum searches, I need to add a non nullable int column to each table in the database called LockVersion, set an initial value of 1, then set each entity property for optimistic concurrency to true. Is this the correct procedure? If not how would you go about this? |
|
|
Yes, that's right. Add the LockVersion column to each database table as described, and set Optimistic Concurrency Checking to true for the corresponding entities. (If you are writing clases by hand rather than using the designer, add a LockVersion field to the entities.) The initial value of LockVersion doesn't really matter (LightSpeed only cares about changes to the value, not about the value itself) so you can set it to 0 or 1 or whatever depending on your preferences. Note that if the designer is hooked up to your dev database, then you can add the LockVersion column and do an Update From Source, and the designer should recognise this and automatically set Optimistic Concurrency Checking for you. |
|