Add TreatTinyAsBoolean connection string option
See original GitHub issueImplement the TreatTinyAsBoolean
connection string option:
false
-TINYINT(1)
is abyte
/sbyte
true
(default) -TINYINT(1)
is abool
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
"Treat Tiny As Boolean" and Entity Framework 4
The trick is to add the 'Treat Tiny As Boolean=False' to the connection string and then to edit the edmx file in bot...
Read more >MySQL .NET Connection String Options
A MySqlConnection is configured using a connection string. The connection string options are key/value pairs described on this page.
Read more >4.5 Connector/NET Connection Options Reference
This chapter describes the full set of MySQL Connector/NET 8.0 connection options. The protocol you use to make a connection to the server...
Read more >Connection Strings in the ADO.NET Entity Framework
A connection string contains initialization information that is passed as a parameter from a data provider to a data source.
Read more >Changes in MySQL Connector/NET 5.2.0 (2008-02-11)
A new connection string option Treat Tiny As Boolean has been added with a default value of true . If set to false...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am about to start work on this, but I think it is worth discussing if
TreatTinyAsBoolean=true
is a sensible default. In my opinion, changing the data types based off length is unpredictable and therefore is not a sensible default, I would prefer to useTreatTinyAsBoolean=false
as the defaultI can see how it is confusing if somebody was using
BOOL
orBOOLEAN
as their field types, however. MySql has created an alias ofBOOL
andBOOLEAN
to map toTINYINT(1)
(they should have made the alias map toBIT(1)
, but too late for that). In this case, I understand why somebody would expectTreatTinyAsBoolean=true
as the default.@bgrainger what is your opinion?
@a-patel This issue is for tracking the implementation of the connection string option, which is done. If you have a bug report or question, please open a new issue.