Page 1 of 1

Changing backend to an existing model

Posted: Wed 23 Apr 2014 19:49
by lc4pro
I had been developing my first model (Model First strategy) and changed my mind: it was against MySql, but now I would like to put the database on a postgresql server.
How do I swap engines losing the least from my work?

TIA

Re: Changing backend to an existing model

Posted: Fri 25 Apr 2014 12:03
by MariiaI
Perform the following steps:
1. Change the connection in the Database Explorer to the necessary one.
2. Check the Target Server in Model Settings -> Synchronization -> Mapping. It must be set to the one that you are going to use (i.e., to PostgreSQL).
3. Select "Regenerate Storage and Mapping" from the diagram shortcut menu for regenerating model parts, specific to the database server.
4. Run the Update Database Wizard to create the database objects.
5. Save changes and open the mapping file. Now it should contain mapping for the new database.

Please tell us if this helps.

Re: Changing backend to an existing model

Posted: Fri 25 Apr 2014 21:36
by lc4pro
Thank you.
It nearly works.
Playing with the Crm sample, at first sight the mapping is correct, but when I go through the Update database wizard, when it reaches the Product table, shows this error

Code: Select all

column "Discontinued" is of type boolean but default expression is of type bit
Looking at the properties and mapping, the field is bool for the .NET class, and boolean for the table in the backend.

What or where is the error raising?

TIA

Edit (same day, two hours later)
I tried the backend swap with the project I'm working on. It worked without complaints...
Nevertheless, I beg the Devart people to look at the error I reported, because it may bit again.

Re: Changing backend to an existing model

Posted: Mon 28 Apr 2014 09:21
by MariiaI
shows this error
CODE: SELECT ALL
column "Discontinued" is of type boolean but default expression is of type bit
Thank you for the report on this. We have reproduced this issue. We will investigate it in more details and inform you about the results as soon as possible.

Re: Changing backend to an existing model

Posted: Fri 16 May 2014 05:12
by MariiaI
The bug related to the storage and mapping regeneration via the "Update Database from Model" wizard, or via the "Regenerate Storage and Mapping" option of the diagram shortcut menu, when changing one DBMS to another, is fixed.
New build of LinqConnect 4.4.499 is available!
It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=29593.