BIT or tinyint to Boolean mapping in EDM schema

BIT or tinyint to Boolean mapping in EDM schema

Postby 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
Posts: 3
Joined: Fri 25 Jul 2008 07:38

Postby 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.
Devart Team
Posts: 7944
Joined: Thu 14 Aug 2008 12:44

Return to dotConnect for MySQL