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.
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.
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.