Entity Developer does not see changes in DB

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
downeytim
Posts: 2
Joined: Thu 10 Dec 2009 16:00

Entity Developer does not see changes in DB

Post by downeytim » Thu 10 Dec 2009 16:04

When I have added tables to a model, saved the model, made changes to the DB tables to correct FK issues, I can't get the model to update to the new DB changes.

How can I get the model to sync with the DB after changes have been made with the DB.

I did not use the reverse engineer wizard to create the model. I just selected a sub-set of tables from my DB to test with.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 10 Dec 2009 16:20

Update from database wizard will be added in one of the future versions of Entity Developer.
As a solution you can simply delete the objects and re-add them (if you are using Entity Framework,
don't forget to remove the objects from the Store part of the model).

Discovery
Posts: 14
Joined: Thu 24 Sep 2009 15:10

Post by Discovery » Thu 10 Dec 2009 16:47

We are currently deleting and re-adding tables and views as they are changed on the SQL Server.

Be aware though, that if you have made changes to the deleted table/view, such as changing an Entity key, adding an association, changing a return type or setting a column nullable (to get around a Crystal Reports limitation), then those changes will be lost and you will have to manually re-add them.

This can be a pain in the arse, especially when you can't work out why your programme keeps crashing after a simple change.

downeytim
Posts: 2
Joined: Thu 10 Dec 2009 16:00

Still did not pick up changes from DB

Post by downeytim » Thu 10 Dec 2009 17:04

I deleted the two tables from the model. both the store and the class sections. Refreshed the Database Explorer, dragged the two tables back onto the model from the Database Explorer and I still see the OLD table structure. I have changed the PK on the parent table but I still see the old PK when I add the refreshed table to the model.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 11 Dec 2009 11:34

Please make sure you have deleted the tables and constraints from the Store part of the model.
I have just checked this and both table and relationship were updated.

Post Reply