Update Database from Model not working

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
ryanmvsg
Posts: 2
Joined: Mon 14 Aug 2017 15:41

Update Database from Model not working

Post by ryanmvsg » Mon 14 Aug 2017 15:51

I'm having some issues trying to get the database updated based on the model file. It successfully detects that a bunch of views need to be added to a schema, but then I click next and it says that no changes need to be made... can anyone help me out with this?

Currently the model validates with no warnings or errors if that provides any useful information. I'm having issues with the "Update To Database Wizard" and "Generate Database Script Wizard".

ryanmvsg
Posts: 2
Joined: Mon 14 Aug 2017 15:41

Re: Update Database from Model not working

Post by ryanmvsg » Mon 14 Aug 2017 18:54

One other note, it seems to only be adding the tables, but it ignores all of the views that were supposed to be added (that the previous screen in the wizard detected as missing, so I don't know why the very next screen would say no changes need to be made).

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: Update Database from Model not working

Post by Shalex » Wed 16 Aug 2017 15:52

That is a designed behavior for storage entity with Type=View because that is a readonly model object with unknown database objects referenced by the database VIEW in its SELECT.

* In case of Type=Table, Entity Developer reads metadata of the table from system tables in database, so the tool knows types of table columns, existing constraints.

* In case of Type=View, Entity Developer constructs entity basing on the result set returned by a database view, and the tool shouldn't modify the database view if the corresponding entity in the model is changed. For example: you changed the column type in the SSDL entity with Type=View in your model, what has Entity Developer to do with a database view via Update To Database (or Generate Database Script) wizards?

Post Reply