Bug #65754 Entity famework 4.1, Tinyint is mapping as a bool in my model
Submitted: 27 Jun 2012 13:30 Modified: 12 Sep 2012 19:21
Reporter: pablo tierno Email Updates:
Status: Can't repeat Impact on me:
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.5.4 OS:Windows (7)
Assigned to: Fernando Gonzalez.Sanchez CPU Architecture:Any
Tags: EF tinyintmapping

[27 Jun 2012 13:30] pablo tierno
When mapping a DB with EF, i get a tinyint column mapped to a Bool.

How to repeat:
When mapping a DB with EF, i get a tinyint column mapped to a Bool.
[27 Jun 2012 14:57] Valeriy Kravchuk
Had you tried to set TreatTinyAsBoolean=false connection string option explicitly?

See http://dev.mysql.com/doc/refman/5.5/en/connector-net-connection-options.html.
[27 Jun 2012 20:35] pablo tierno
I tried adding this to the connection string and EF continues mapping the column as Boolean.
[28 Jun 2012 13:11] pablo tierno
I added the TreatTinyIntAsBoolen and worked only when i edited the model.edmx by hand. The VS mapping tool continued generating the Boolean columns.
[9 Aug 2012 0:13] Fernando Gonzalez.Sanchez

I assume you were trying EF database first, generated a model from

CREATE TABLE `tinyinytest2` (
  id int auto_increment primary key,
  `val` tinyint DEFAULT NULL

And the entity generated in the EDM was correct, in particular `val` was translated to sbyte.
(I am using Connector/NET 6.6.1).

Can you provide details on how to reproduce it please?

[9 Sep 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".