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

Wizard and Version Field

3 Answers 53 Views
Design Time (Visual Designer & Tools)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alfred Ortega
Top achievements
Rank 2
Alfred Ortega asked on 04 Nov 2009, 02:07 AM
Does the wizard recognize when a field is marked as a versionid and set the attribute of the table appropriately?

3 Answers, 1 is accepted

Sort by
0
IT-Als
Top achievements
Rank 1
answered on 04 Nov 2009, 07:47 AM
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.

Regards

Henrik


0
Alfred Ortega
Top achievements
Rank 2
answered on 05 Nov 2009, 02:47 AM
Henrik,
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.

Al
0
Ady
Telerik team
answered on 05 Nov 2009, 11:25 AM
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.

Greetings,
Ady
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.
Tags
Design Time (Visual Designer & Tools)
Asked by
Alfred Ortega
Top achievements
Rank 2
Answers by
IT-Als
Top achievements
Rank 1
Alfred Ortega
Top achievements
Rank 2
Ady
Telerik team
Share this question
or