EF converting number(1) to bool (i don't want it)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Jaime Yule
Posts: 3
Joined: Fri 18 Nov 2011 11:36

EF converting number(1) to bool (i don't want it)

Post by Jaime Yule » Fri 18 Nov 2011 12:05

Hello guys.. first of all.. my english is not good.. its a ***

Well, im using Devart dotConnect for Oracle + Linq to Entity, .NET 3.5.

I just created my entitys.. from the database already created and populated (the system is from an old client). Everything was goin good until i faced this problem. i have a lot of number(1) in the database schema. Its the mostly of times is a kind of situation from that object.. like Cliente - Situation.

I tried to config manually the edml, csdl, ssdl. but it still throws a problem saying that Devart.Data.Oracle.bool isn't compatible.

ill keep trying here.. and sorry again my english.

Jaime Yule
Posts: 3
Joined: Fri 18 Nov 2011 11:36

Post by Jaime Yule » Fri 18 Nov 2011 19:21

help!! PLZ!

is the only way to solve it change those number(1) to varchar2(1) ?
there's no kind of settings that i can config ?!

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 22 Nov 2011 09:27

Are you using ADO.NET Entity Data Model (*.edmx) or Devart Entity Model (*.edml)?

*.edmx -> You can set the "Number Mappings = (Integer, 1, 1, System.Int32)" connection string parameter:
http://www.devart.com/dotconnect/oracle ... tring.html

*.edml -> The Number Mappings support will be implemented starting from the next version (not build) of Entity Developer.

Jaime Yule
Posts: 3
Joined: Fri 18 Nov 2011 11:36

Solved the problem yesterday.

Post by Jaime Yule » Tue 22 Nov 2011 13:27

I was trying to manually config it in the .ssdl file.. but failed.

i just changed the bool's propertys to int in my Diagram Layer -> Model Explorer -> Store. And changed on by one..

but.. i still want to know where i can config the Entity Framework to translate number(1) to int, not bool

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 23 Nov 2011 15:34

Jaime Yule wrote:but.. i still want to know where i can config the Entity Framework to translate number(1) to int, not bool
The Number Mappings support will be implemented starting from the next version (not build) of Entity Developer (the *.edml models). We will post here when the corresponding build of dotConnect for Oracle is available for download.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 09 Dec 2011 16:52

New version of dotConnect for Oracle 6.60 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=22836 .

hfrmobile
Posts: 2
Joined: Wed 25 Apr 2012 10:52
Location: Austria
Contact:

Post by hfrmobile » Wed 25 Apr 2012 11:22

Interesting behavior (NUMBER(1) --> bool). What is the idea behind it? I guess it is necessary because Oracle doesn't support a native BIT type as MS-SQL does?

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 27 Apr 2012 09:45

Yes, this is correct.
Here is a default mapping: http://www.devart.com/dotconnect/oracle ... pping.html
If necessary, you can change default mapping:
1) via the Tools > Options > Servers' Options > Oracle menu (for Entity Developer)
2) using the "Number Mappings = (Integer, 1, 1, System.Int32)" connection string parameter (for EDM Wizard)

Post Reply