Bug #61657 CHAR(36) is wrongly mapped as String rather than GUID in 6.3.7
Submitted: 27 Jun 2011 14:12 Modified: 30 Jun 2011 21:39
Reporter: Wenbin Xu Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.3.7 OS:Windows (Windows 7)
Assigned to: Julio Casal CPU Architecture:Any
Tags: .net Connector, entity framework, visual studio 2010, windows 7

[27 Jun 2011 14:12] Wenbin Xu
Description:
Symptom
-------
Any CHAR(36) columns defined are wrongly mapped as char/String types in EDMX definition. Also, this issue applies to Stored Procedure IN parameters with  CHAR(36) definition.

How to repeat:
Create any table with one ore more columns in type of CHAR(36), and then generate EDMX in VS2010 EMD designer.

Open up the resulting EDMX file and notice that CHAR(36) is wrongly mapped as String instead of GUID.

Take a look at the EDMX definition, the incorrectness starts in the SSDL type generated. See below:

Incorrect data type mapping in v6.3.7
    <Property Name="TaskId" Type="char" Nullable="false" MaxLength="36" />

Correct data type mapping in v6.3.6
    <Property Name="TaskId" Type="guid" Nullable="false" />

Workarond
---------
Manually change the wrong type to GUID. This is terrible if there're many GUID columns.

Suggested fix:
Revert back to the correct behavior in v6.3.6
[30 Jun 2011 21:39] Julio Casal
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

Fixed in 6.1.7, 6.2.5, 6.3.8, 6.4.3+.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html