Page 1 of 1
ED5 and use of GUIDs as Primary Keys??
Posted: Thu 24 Jan 2013 01:31
by EdB
(Reposted from EF Support as wrong forum)
Hi All,
New to Entity Developer 5(ED5), so hi.
I am just trying to setup a GUID for a primary key for a table which auto populates on the server (Entity Framework 5/ SQL Server 2008 R2). I tried setting the "Store Generated" value to "Identity", but no joy. It seems ED5 only wants a type of INT for sequential key autogeneration.
Is GUID Key autogeneration possible? If so how does one define it in ED5?
Thanks,
Ed
Re: ED5 and use of GUIDs as Primary Keys??
Posted: Mon 28 Jan 2013 10:33
by Shalex
EdB wrote:Is GUID Key autogeneration possible? If so how does one define it in ED5?
Do you mean the Generate Database Script/Update Database From Model functionality in Entity Developer for GUID "Store Generated Pattern=Identity" properties (like a suggestion for EDM Wizard at
http://entityframework.codeplex.com/workitem/551)?
Re: ED5 and use of GUIDs as Primary Keys??
Posted: Mon 28 Jan 2013 11:35
by EdB
Hi,
Thanks for the reply.
I guess so. Basically I need to be able to specify a GUID ID that will be automatically created on insertion of record, preferably at DB level so if I use SQL Manager to insert a record then I still get a new GUID, like how an INT ID with the IDENTITY attribute set works.
Ed
Re: ED5 and use of GUIDs as Primary Keys??
Posted: Tue 29 Jan 2013 08:21
by Shalex
We are investigating the possibility of implementing this functionality.
Re: ED5 and use of GUIDs as Primary Keys??
Posted: Tue 29 Jan 2013 16:50
by EdB
Thanks...
Re: ED5 and use of GUIDs as Primary Keys??
Posted: Tue 29 Jan 2013 17:24
by Shalex
The behaviour is changed: Generate Database Script/Update Database From Model wizards generate column with the default value NEWSEQUENTIALID() for Guid property with 'Store Generated Pattern=Identity'. We will post here when the corresponding build of Entity Developer is available for download.
Re: ED5 and use of GUIDs as Primary Keys??
Posted: Wed 30 Jan 2013 17:23
by EdB
Thanks, really appreciated.
Ed
Re: ED5 and use of GUIDs as Primary Keys??
Posted: Thu 07 Feb 2013 12:50
by Shalex
New build of Entity Developer 5.0.43 is available!
It can be downloaded from
http://www.devart.com/entitydeveloper/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=32&t=25825.
Re: ED5 and use of GUIDs as Primary Keys??
Posted: Thu 07 Feb 2013 13:03
by EdB
Thanks, appreciated.