Page 1 of 1

Identity Guid Properties

Posted: Wed 29 Jun 2011 23:14
by johnwest80
My tables use Guids for the primary key, with a default value of newid(). I set the conceptual and storage "Store Generated" attribute to Identity. This works. However, every time I update the model from the database, it wants to update the primary key from [Identity(Old="true", New="false")]. Is there any way to stop this?

Posted: Fri 01 Jul 2011 14:39
by AndreyR
Thank you for the inquiry. I have reproduced this situation. It is associated with the fact that this column is not marked as Identity in the database.
We will investigate the possibility of changing this behaviour for Guids.
I will let you know about the results of our investigation.

Posted: Thu 07 Jul 2011 17:11
by johnwest80
This would be huge!

At least in the meanwhile, can you have the ability to not update the entire model, but only update the currently selected table? Or, at least have an "Unselect all" at the update dialog?

Posted: Fri 08 Jul 2011 10:38
by AndreyR
The upcoming build already contains the fix for the Guid Identity problem.
I will let you know as soon as this build is released.

Posted: Mon 11 Jul 2011 08:48
by AndreyR
This feature is added in the latest 4.0.15 build of Entity Developer for SQL Server. The new build can be dowloaded from here (the trial version) or from Registered Users' Area (for users with active subscription only):
For the detailed information about the improvements and fixes available in EntityDeveloper for SQL Server 4.0.15, please refer to
this announcement.

Posted: Wed 13 Jul 2011 17:57
by johnwest80
So far, so good. Another related issue is still around. I have many fields called "CreatedDate". It's default value in the db is set to getdate(). I set it to "Computed" in the conceptual and storage model. However, when updating the model from the db, it keeps wanting to change it. It displays the message "IsExpression(old='True', new='False') was changed". Can you fix this?

Posted: Thu 14 Jul 2011 11:49
by AndreyR
We are investigating the possibility to change this behaviour.
We will let you know about the results of our investigation.

Posted: Fri 15 Jul 2011 02:20
by johnwest80
Awesome! Once this is fixed, I won't have to be unchecking all the incorrectly flagged changes every time I update the model. It might not seem like much, but when you're building a model and updating it multiple times a day, it can get kind of tiresome :).

Posted: Wed 20 Jul 2011 14:14
by AndreyR
We have changed the behaviour. Please note that the correct StoreGeneratedPattern setting for DateTime columns with the default value set to getdate() is Identity, because the Default value is taken into account only on Insert.

Posted: Wed 27 Jul 2011 13:52
by johnwest80
Awesome! What/where is the version that contains this change?

Posted: Thu 28 Jul 2011 14:35
by StanislavK
The fix for this issue is available in the new 4.0.24 build of Entity Developer for SQL Server we've released today.

You can download the new build from
http://www.devart.com/entitydeveloper/download.html
(the trial and free versions) or from Registered Users' Area (provided that you have an active subscription):
http://secure.devart.com/