EntityFramework, Oracle, and Guid as PrimaryKey - HOWTO?
Posted: Wed 27 May 2009 14:31
Hi!
My company is probably getting a big deal with another company, which requires us to use an oracle-db instead of SQLServer 2008.
I am looking right now for an Entity Framework Provider which fits our needs. Your product looks very promising though.
I am absolutely new to Oracle databases.
How do you create a table with GUID/uniqueidentifier as primary-key?
I read about raw(32), raw(32), varchar(32),varchar(36) etc.
There is a function called SYS_GUID() which seemd to work.
The db i have created worked with generated guids,too.
But when i added them to the Entity Framework i got this problems:
Message 2 The table/view 'Catalog1.WPC.PROJECT' has column 'PROJECT_ID' defined as a primary key, but the column type 'RAW' is not a valid type for a key in EDM. An attempt will be made to define the table/view as a read-only table/view.
So my question would be, how to do it? Is it possible?
Strange new world these oracle databases... The most important thing i noticed is that they really like CAPS_LOCK.....
Thx for your help!
My company is probably getting a big deal with another company, which requires us to use an oracle-db instead of SQLServer 2008.
I am looking right now for an Entity Framework Provider which fits our needs. Your product looks very promising though.
I am absolutely new to Oracle databases.
How do you create a table with GUID/uniqueidentifier as primary-key?
I read about raw(32), raw(32), varchar(32),varchar(36) etc.
There is a function called SYS_GUID() which seemd to work.
The db i have created worked with generated guids,too.
But when i added them to the Entity Framework i got this problems:
Message 2 The table/view 'Catalog1.WPC.PROJECT' has column 'PROJECT_ID' defined as a primary key, but the column type 'RAW' is not a valid type for a key in EDM. An attempt will be made to define the table/view as a read-only table/view.
So my question would be, how to do it? Is it possible?
Strange new world these oracle databases... The most important thing i noticed is that they really like CAPS_LOCK.....
Thx for your help!