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

Problem with Identity mechanism in visual model after update

1 Answer 71 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.
Henk
Top achievements
Rank 1
Henk asked on 05 Nov 2010, 12:01 PM
Hi,

I create a new Domain Model with the Telerik OpenAccess ORM Data Wizard and choose "BackendCalculated" for the Identity Mechanism for each object and save it.
If I afterwards update my model from the database (In the Model Schema Explorer right click and choose "Update From Database..") because I added columns in my database table, there is a problem with the Identity mechanism in the objects. It behaves like it is not set to "BackendCalculated"

It looks like the visual presentation of the object properties in the model is not in sync with the actual model definition. Because if I switch  "Identity mechanism" to default, save the model, and change it back to "BackendCalculated", and save again, it is working as expected.

Kind Regards.

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander
Telerik team
answered on 10 Nov 2010, 04:16 PM
Hi Henk,

You are right, it really seems that the meta class on the diagram is not synchronized with the actual persistent class definition, we will have to investigate and fix this, thank you for reporting it.
When you applied the changes from the database, the identity mechanism property of the persistent class has been changed back to Default. This is in fact expected behavior because when you set the identity mechanism of the class to Backed Calculated, an attribute named Autoinc is set to true on the primary key column of the meta table instance. Later, when you update from database, there is a change detected for this Autoinc attribute. If you do not apply this change the identity mechanism of the class will be left as you have set it (BackendCalculated).
In the Update from Database wizard you are able to see this change if you double-click on the table detected as modified, and then once again on the primary key column. In this case you can apply the changes only for the newly added columns and skip the one for the primary key column that would change the identity mechanism if applied.
Hope that helps.

Sincerely yours,
Alexander
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Design Time (Visual Designer & Tools)
Asked by
Henk
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or