This is a migrated thread and some comments may be shown as answers.

NO_UPDATE_LOST

1 Answer 48 Views
LINQ (LINQ specific questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Devanand Chahal
Top achievements
Rank 2
Devanand Chahal asked on 03 Feb 2010, 10:58 AM
Hello,

I have two different users working on the same set of data of type class1,
 
consider user1 read data (and add this data to the object of type class1) from database and bring it on page for modification,
at the same time user2 also did the same thing , now i want to keep the changes from both users, 
consider class1 have 3 attributes say  id, rackId and quantity
when both users bring data on page for modification the value for these attributes say
objClass1.id = 10
objClass1.rack = 2
objClass1.quantity = 5

now modification done by user1 is
objClass1.id = 10
objClass1.rack = 3 [Value modified]
objClass1.quantity = 5
 now user1 commits his changes
now the value reads in datatable are
id = 10, rack = 3, quantity = 5

as user2 taken the same record before user1 commit and he also updates some attributes for example,

objClass1.id = 10
objClass1.rack = 2
objClass1.quantity = 7 [value modified]

when user2 commits, the values in datatable are : 
id = 10, rack = 2, quantity = 7 [modification for rack(rack=3) made by user1 is reverted back to old value(rack=2) by user2]

but i want that if user1 have changes some column that is/are not changed by user2 should retain its value, mean if both the user doing changes in different attributes at same time then changes from both users should be maintained, so as per my requirement when user2 commits, the result should be 
id = 10, rack = 3, quantity = 7

is it possible throught telerik or not......???

Regards,
Dev











1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 06 Feb 2010, 09:27 AM
Hello Devanand Chahal,

Yes, this is possible. Please have a look at our Concurrency control documentation section for details about the available concurrency control modes and their requirements.
Basically to achieve NO_LOST_UPDATE behavior you have to set the Verify by option in the Forward mapping wizard to none for each class and set the concurrency mode of the transaction to OPTIMISTIC_NO_LOST_UPDATES:
scope.TransactionProperties.Concurrency = TransactionMode.OPTIMISTIC_NO_LOST_UPDATES;
Hope that helps.

All the best,
Alexander
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
LINQ (LINQ specific questions)
Asked by
Devanand Chahal
Top achievements
Rank 2
Answers by
Alexander
Telerik team
Share this question
or