BIT or tinyint to Boolean mapping in EDM schema

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Posts: 3
Joined: Fri 25 Jul 2008 07:38

BIT or tinyint to Boolean mapping in EDM schema

Post by Marcel_NL » Tue 11 Nov 2008 14:41

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

Devart Team
Posts: 8072
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 11 Nov 2008 17:35

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.

Post Reply