Unable to update model

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
mpdjhb
Posts: 5
Joined: Fri 06 May 2016 11:59

Unable to update model

Post by mpdjhb » Wed 11 May 2016 07:31

I have a model with a number of tables in it.
Whenever I need to change the underlying table (add, drop columns for example) I cannot seem to get the model to update without recreating it entirely (delete model, add new one).
I am also unable to add or remove tables from a model.

I have tried refreshing the database connection (and in there I can see the new or removed columns).
I have tried regenerating the model (this does "nothing" - model is unchanged)

What am I missing please?


Using mysql 5.6 Cluster, Percona Version

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

Re: Unable to update model

Post by Shalex » Thu 12 May 2016 09:56

Please send us a small test project and specify the exact steps we should follow with it for reproducing the issue.

mpdjhb
Posts: 5
Joined: Fri 06 May 2016 11:59

Re: Unable to update model

Post by mpdjhb » Sun 15 May 2016 05:03

The steps are trivial, so if I may, let me post here:

I have percona 5.6 (both server and cluster, on different machines)
All databases are on Ubuntu Linux, Code is on Windows 10, 2015 Visual Studio


Create a database call temp, with a table called temptable (id int);
Build a LINQ model (New...Data...DevartLinqModel)

Save, compile, build etc

Go back to mysql, add a new column to the table:
alter table temptable add mynewfield char(10);

Go back to C#:
How do I get the model to now recognize the table has changed? What exactly must I click on etc?

Many thanks!

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

Re: Unable to update model

Post by Shalex » Wed 18 May 2016 10:29

mpdjhb wrote:How do I get the model to now recognize the table has changed? What exactly must I click on etc?
Please open your *.lqml model, right click the diagram surface > Update Model From Database, follow the wizard to update model, then save the model to regenerate the code.

For more information, refer to http://www.devart.com/entitydeveloper/e ... eloper.chm > ORM Support > LinqConnect > Synchronizing Model and Database Data > Updating Model from Database. If the pages of *.chm are empty, right click the *.chm file, select Properties, and click on the "Unblock" button. Click "Apply" to show the content.

mpdjhb
Posts: 5
Joined: Fri 06 May 2016 11:59

Re: Unable to update model

Post by mpdjhb » Tue 24 May 2016 09:45

Good day

I tried all the suggestions and I am still not able to update a model.

I have to delete and rebuild each time.

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

Re: Unable to update model

Post by Shalex » Tue 24 May 2016 17:47

1. Please send us a small test project and specify the exact steps we should follow with it for reproducing the issue.
2. Specify your current version (x.x.x) of LinqConnect.

Post Reply