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

Catastrophic Data Loss

1 Answer 102 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jaime Weise
Top achievements
Rank 1
Jaime Weise asked on 21 Jun 2010, 09:05 PM
I don't want to lose my data accidentally
I was just playing around with OpenAccess. It seems that if I change the variable name of a backing field of a property then the column is deleted from the database and all the data is lost forever. If someone is working on code and a class file gets uploaded to the production application it seems like a little bit risky to have this auto-delete function as it does. Is there any attribute or something on the class that will protect this from happening or is this just a danger with that comes with using OpenAccess framework?

1 Answer, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 22 Jun 2010, 10:33 AM
Hi Jaime,

at the moment, we don't have any active provisions that could guard you against these kind of changes in your model. What you can do is to turn off database update (that can't detect field and class renamings), generate the DDL script through Database.GetSchemaHandler().CreateUpdateDDLScript(), review it and execute it programmatically by ExecuteDDLScript(). The same content is also stored in a file in the output directory, so that you can review it later, or generate a combined script that can then be applied to your production database. This assumes that you are not directly working against your production database, but modify a developer's version and that you are using 'forward' mapping (class->table)
We are in the process of defining a better, likely more fail-safe approach for these kind of operations for a future version. Your input is very welcome!

Sincerely yours,
Thomas
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
Data Access Free Edition
Asked by
Jaime Weise
Top achievements
Rank 1
Answers by
Thomas
Telerik team
Share this question
or