NUMBER(1) automapped to BOOLEAN but true = -1, need true = 1

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
Posts: 33
Joined: Thu 20 May 2010 08:57
Location: Wales, UK.

NUMBER(1) automapped to BOOLEAN but true = -1, need true = 1

Post by r.m.saddler » Tue 06 Jul 2010 09:18


We have many columns in our database of type NUMBER(1) and we store a 0 to represent FALSE and a 1 to represent TRUE.

The EF however is passing -1 to the database in the generated SQL - anyone where/how can I hook in to change this behaviour?

Many thanks,


Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 07 Jul 2010 14:46

The following code uses "1" as a representation of the "true" boolean value.
Could you please post here the code you are using to insert?

Code: Select all

        Boolsptest bst = new Boolsptest
          Id = 5,
          Boolfield = true

I was using the latest 5.70.146 build for testing, Oracle

Post Reply