ED5 and use of GUIDs as Primary Keys??

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
EdB
Posts: 91
Joined: Mon 15 Oct 2012 09:24

ED5 and use of GUIDs as Primary Keys??

Post by EdB » Thu 24 Jan 2013 01:31

(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

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: ED5 and use of GUIDs as Primary Keys??

Post by Shalex » Mon 28 Jan 2013 10:33

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)?

EdB
Posts: 91
Joined: Mon 15 Oct 2012 09:24

Re: ED5 and use of GUIDs as Primary Keys??

Post by EdB » Mon 28 Jan 2013 11:35

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

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: ED5 and use of GUIDs as Primary Keys??

Post by Shalex » Tue 29 Jan 2013 08:21

We are investigating the possibility of implementing this functionality.

EdB
Posts: 91
Joined: Mon 15 Oct 2012 09:24

Re: ED5 and use of GUIDs as Primary Keys??

Post by EdB » Tue 29 Jan 2013 16:50

Thanks...

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: ED5 and use of GUIDs as Primary Keys??

Post by Shalex » Tue 29 Jan 2013 17:24

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.

EdB
Posts: 91
Joined: Mon 15 Oct 2012 09:24

Re: ED5 and use of GUIDs as Primary Keys??

Post by EdB » Wed 30 Jan 2013 17:23

Thanks, really appreciated.

Ed

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: ED5 and use of GUIDs as Primary Keys??

Post by Shalex » Thu 07 Feb 2013 12:50

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.

EdB
Posts: 91
Joined: Mon 15 Oct 2012 09:24

Re: ED5 and use of GUIDs as Primary Keys??

Post by EdB » Thu 07 Feb 2013 13:03

Thanks, appreciated.

Post Reply