Entity Developer v6.1.215
Tested using Postgres, this issue may occur in other database engines as well (untested).
How to reproduce issue
PgAdmin
1) Create two tables (do not add foreign key)
Entity Developer
2) Open Entity Developer and import the tables (Database --> Model)
3) Add an association
4) Update the database (Model --> Database)
In step #4, you will notice that Entity Developer is unable to detect that the new association/foreign key relationship you just created in Entity Developer does not yet exist in the physical database, now the model and the database is out of sync (the models are not the same as the database tables, its different!)
BUG? Association, Foreign key, Sync is broken? (Model --> Database)
Re: BUG? Association, Foreign key, Sync is broken? (Model --> Database)
If your model is Devart Entity Model (*.edml), you should run Regenerate Storage and Mapping to create FK in SSDL basing on the new association in CSDL.
In case this doesn't help:
1) send us a test model for reproducing
2) is FK created by the Generate Database Script From Model wizard?
In case this doesn't help:
1) send us a test model for reproducing
2) is FK created by the Generate Database Script From Model wizard?
Re: BUG? Association, Foreign key, Sync is broken? (Model --> Database)
How do you regenerate storage and mapping?Shalex wrote:If your model is Devart Entity Model (*.edml), you should run Regenerate Storage and Mapping to create FK in SSDL basing on the new association in CSDL.
Yes the FK exist, it's just when you do an "Update database from model" it's not there! new relationship changes goes undetected.Shalex wrote:2) is FK created by the Generate Database Script From Model wizard?
Re: BUG? Association, Foreign key, Sync is broken? (Model --> Database)
You should open your *.edml model, right click the diagram surface > Regenerate Storage and Mapping.RobertK wrote:How do you regenerate storage and mapping?Shalex wrote:If your model is Devart Entity Model (*.edml), you should run Regenerate Storage and Mapping to create FK in SSDL basing on the new association in CSDL.
Please send us a test model for reproducing the issue when FK is CREATED by the Generate Database Script From Model wizard and NOT created by the Update Database From Model wizard.RobertK wrote:Yes the FK exist, it's just when you do an "Update database from model" it's not there! new relationship changes goes undetected.Shalex wrote:2) is FK created by the Generate Database Script From Model wizard?