Identity Guid Properties

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
johnwest80
Posts: 27
Joined: Thu 09 Jun 2011 22:32

Identity Guid Properties

Post by johnwest80 » Wed 29 Jun 2011 23:14

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?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 01 Jul 2011 14:39

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.

johnwest80
Posts: 27
Joined: Thu 09 Jun 2011 22:32

Post by johnwest80 » Thu 07 Jul 2011 17:11

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?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 08 Jul 2011 10:38

The upcoming build already contains the fix for the Guid Identity problem.
I will let you know as soon as this build is released.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 11 Jul 2011 08:48

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.

johnwest80
Posts: 27
Joined: Thu 09 Jun 2011 22:32

Post by johnwest80 » Wed 13 Jul 2011 17:57

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?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 14 Jul 2011 11:49

We are investigating the possibility to change this behaviour.
We will let you know about the results of our investigation.

johnwest80
Posts: 27
Joined: Thu 09 Jun 2011 22:32

Post by johnwest80 » Fri 15 Jul 2011 02:20

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 :).

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 20 Jul 2011 14:14

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.

johnwest80
Posts: 27
Joined: Thu 09 Jun 2011 22:32

Post by johnwest80 » Wed 27 Jul 2011 13:52

Awesome! What/where is the version that contains this change?

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

Post by StanislavK » Thu 28 Jul 2011 14:35

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/

Post Reply