Bug when updating Model from Database

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Posts: 163
Joined: Wed 15 Apr 2009 08:43

Bug when updating Model from Database

Post by crazypit » Thu 04 Aug 2011 12:50

Using the latest LinqConnect version, when updating a model from an Oracle 11g database and for a CHAR(1) NOT NULL column that maps to a String property and its Default value is set to "3", i always get a synch mismatch with the following information :

DefaultValue(old='3', new="3") was changed.

Pay attention to the mismatch on the type of the quotes.

If i enclose the Default Value of the property of my class in single quotes, '3', everything works. If i set it to 3 without any quotes, i get the bug.

Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 05 Aug 2011 16:33

As far as I can understand, the default value of the column is set to "3" (with double quotes) in the model, and to '3' (with single quotes) in the database (e.g., the script creating the table includes 'MY_COLUMN CHAR(1) DEFAULT '3' NOT NULL'). Please specify if I am correct.

In this case, Entity Developer will consider these default values to be different and the values specified in the model will be changed when running the 'Update from Database' wizard. After this, the default values should be synchronized. Please specify if you observe (or expect) some other behaviour.

Also, please specify the error you are getting when the default value is set without quotes.

Post Reply