Thread is closed for posting
2 posts, 0 answers
  1. Devanand Chahal
    Devanand Chahal avatar
    26 posts
    Member since:
    Mar 2009

    Posted 03 Feb 2010 Link to this post


    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 = 10
    objClass1.rack = 2
    objClass1.quantity = 5

    now modification done by user1 is = 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, = 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......???


  2. Alexander
    Alexander avatar
    727 posts

    Posted 06 Feb 2010 Link to this post

    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,
    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.
Back to Top