Catastrophic Data Loss

2 posts, 0 answers
  1. Jaime Weise
    Jaime Weise avatar
    25 posts
    Member since:
    Nov 2008

    Posted 21 Jun 2010 Link to this post

    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?
  2. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 22 Jun 2010 Link to this post

    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
  3. DevCraft banner
Back to Top