EDM .net GUID
EDM .net GUID
Hi All,
Is there anyway to get the EDM MySQL driver to support GUID? I currently use CHAR(36) in the MySQL schema.
Regards,
Pleb
Is there anyway to get the EDM MySQL driver to support GUID? I currently use CHAR(36) in the MySQL schema.
Regards,
Pleb
I see that there isn't much chance of GUID (UUID) working in your current driver. I wondering if you've ever been asked to add a connection string parameter that would toggle the conversion of CHAR(36) my favourite, CHAR(48), or BINARY(16) to a GUID type. This way you could opt in for the behaviour.
Thanks Pleb
Thanks Pleb
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
Hello,
As MySQL server doesn't support GUID type, MyDirect .NET will not provide a design-time support for it.
In the coming build you will be able to set the GUID type,
manually editing the edmx XML file.
Regards,
Alexey.
As MySQL server doesn't support GUID type, MyDirect .NET will not provide a design-time support for it.
In the coming build you will be able to set the GUID type,
manually editing the edmx XML file.
Code: Select all
Alexey.
First thanks for the support of Guids, as this will make switching between the corelabs MySQL entity driver and any other entity driver which supports Guids easier.
I'd just like to raise the topic of "Is there a better way"
What are you thoughts of a global configuration form where you could set conditions that would apply to type selection when reverse engineering the database - table structure.
For example
"MySQL Type char, length 36, .net type Guid"
or
"MySQL Type tiny int, length 1, .net type Bool"
or
"MySQL Type enum, .net type String"
or
"MySQL Type set, .net type String"
This way the responsibility would be handed off to the developer for mapping non straight forwards types.
Pleb
I'd just like to raise the topic of "Is there a better way"
What are you thoughts of a global configuration form where you could set conditions that would apply to type selection when reverse engineering the database - table structure.
For example
"MySQL Type char, length 36, .net type Guid"
or
"MySQL Type tiny int, length 1, .net type Bool"
or
"MySQL Type enum, .net type String"
or
"MySQL Type set, .net type String"
This way the responsibility would be handed off to the developer for mapping non straight forwards types.
Pleb
Hi Andrey,
I agree that this is rather sophisticated, though I had a little chuckle when when I thought about the implementation of an ado data provider and it's sophistication. Isn't that what you deal with everyday?
Here's me thinking out loudly,
The configuration form would reside in VS, and the mappings would store locally on the developers machine.
How do you get these mappings to work with the mysql ado.net driver and entity driver?
A custom configuration section in the app.config or web.config file? The configuration form could write out this section for the developer. A developer could write out there own configuration.
Maybe an interface or abstract class could be used. The configuration form writes out the necessary classes or a developer creates them manually. The objects are loaded into the driver, and when the driver is working out the type, you could use these objects as call backs which would give the implementation to handle the type and conversion to and from?
Ok now I see why it's sophisticated
Hmmm
What are you guys thinking?
Pleb
I agree that this is rather sophisticated, though I had a little chuckle when when I thought about the implementation of an ado data provider and it's sophistication. Isn't that what you deal with everyday?
Here's me thinking out loudly,
The configuration form would reside in VS, and the mappings would store locally on the developers machine.
How do you get these mappings to work with the mysql ado.net driver and entity driver?
A custom configuration section in the app.config or web.config file? The configuration form could write out this section for the developer. A developer could write out there own configuration.
Maybe an interface or abstract class could be used. The configuration form writes out the necessary classes or a developer creates them manually. The objects are loaded into the driver, and when the driver is working out the type, you could use these objects as call backs which would give the implementation to handle the type and conversion to and from?
Ok now I see why it's sophisticated
Hmmm
What are you guys thinking?
Pleb
First, sorry for delay.
The configuration form will be implemented in one of the future versions.
It will contain rules enforcible by users (for example, map tinyint(1) to System.Boolean)
But the full freedom in mapping cannot be gained to users at the moment, because in the most cases it will cause problems in runtime.
The configuration form will be implemented in one of the future versions.
It will contain rules enforcible by users (for example, map tinyint(1) to System.Boolean)
But the full freedom in mapping cannot be gained to users at the moment, because in the most cases it will cause problems in runtime.
Hi All,
It is great that a manual support for GUID's is implemented, but it seems that it is a problem using the GetObjectByKey and TryGetObjectByKey methods with the provider. I am always getting a System.NotSupportedException with "DbType Guid is not supported" in return.
Is there a solution for this problem?
Mats
It is great that a manual support for GUID's is implemented, but it seems that it is a problem using the GetObjectByKey and TryGetObjectByKey methods with the provider. I am always getting a System.NotSupportedException with "DbType Guid is not supported" in return.
Is there a solution for this problem?
Mats