ED5 and use of GUIDs as Primary Keys??
ED5 and use of GUIDs as Primary Keys??
(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
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??
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)?EdB wrote:Is GUID Key autogeneration possible? If so how does one define it in ED5?
Re: ED5 and use of GUIDs as Primary Keys??
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
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??
We are investigating the possibility of implementing this functionality.
Re: ED5 and use of GUIDs as Primary Keys??
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??
Thanks, really appreciated.
Ed
Ed
Re: ED5 and use of GUIDs as Primary Keys??
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.
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??
Thanks, appreciated.