Wizard and Version Field

Thread is closed for posting
4 posts, 0 answers
  1. Alfred Ortega
    Alfred Ortega avatar
    193 posts
    Member since:
    May 2005

    Posted 03 Nov 2009 Link to this post

    Does the wizard recognize when a field is marked as a versionid and set the attribute of the table appropriately?
  2. IT-Als
    IT-Als avatar
    381 posts
    Member since:
    Sep 2008

    Posted 04 Nov 2009 Link to this post

    Hi Alfred,

    I am not sure I understand your question correctly: If this is forward mapping of classes or?

    If it is forward mapping:
    In the mapping dialog for a specific class, you can assign a version field (of the class) to be used for optimistic concurrency. This field is when mapped to the database table and only used by OA for optimistic concurrency control.
    Also, in the .NET attribute OpenAccess.Persistent that you use to decorate your persistent classes you can also define the id and the version fields (of the class) to be used.



  3. Alfred Ortega
    Alfred Ortega avatar
    193 posts
    Member since:
    May 2005

    Posted 04 Nov 2009 Link to this post

    Sorry my question was unclear.  I'm actually referring to what happens to the generated class when reverse mapping.  the VersionField attribute doesn't get added to the class properly and every time you have to manually add it.  Of course when you regenerate your changes are removed.  Also when you select a field as a VersionField using the wizard - it doesn't get generated which you also then have to do manually.  So I put the field and property in the class that doesn't get regenerated so I only have to do that once but the wizard should handle that scenario properly.

  4. Ady
    Ady avatar
    589 posts

    Posted 05 Nov 2009 Link to this post

    Hi Alfred Ortega,

     Although the Reverse mapping wizard did not generate the version field or the VersionField property in the Persistent attribute, the right mapping entries were made in the app.config file.

    This behavior is improved in the Q3 release. The version field is now generated by default (this can be switched off) and the right mapping entries are made to the app.config file, so you do not need to manually modify the code to add the version field anymore.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top