Page 1 of 1

BIT or tinyint to Boolean mapping in EDM schema

Posted: Tue 11 Nov 2008 14:41
by Marcel_NL
I have imported an existing MySql schema in the entity diagram designer. The BIT field is defined as a “sbyte” type. When I change the property type to Boolean the follow error occurs.

Member Mapping specified is not valid. The type 'Edm.Boolean[Nullable=False,DefaultValue=]' of member 'Active' in type 'Model.Entity' is not compatible with 'CoreLab.MySql.sbyte[Nullable=False,DefaultValue=]' of member 'Active' in type 'Model.Store.Entity'.

I cannot see why this conversion is illegal. I use CoreLab.MySql version 4.85.36.0.

Posted: Tue 11 Nov 2008 17:35
by Shalex
As we understand, this is an Entity Framework issue. If you want to change mapping to make a BIT type column mapped to System.Boolean, it is needed to change not only the CSDL part of an .edmx file, but the appropriate columns in SSDL part should be changed from sbyte to boolean too.