Page 1 of 1

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

Posted: Fri 18 Nov 2011 12:05
by Jaime Yule
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.

Posted: Fri 18 Nov 2011 19:21
by Jaime Yule
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 ?!

Posted: Tue 22 Nov 2011 09:27
by Shalex
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.

Solved the problem yesterday.

Posted: Tue 22 Nov 2011 13:27
by Jaime Yule
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

Posted: Wed 23 Nov 2011 15:34
by Shalex
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.

Posted: Fri 09 Dec 2011 16:52
by Shalex
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 .

Posted: Wed 25 Apr 2012 11:22
by hfrmobile
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?

Posted: Fri 27 Apr 2012 09:45
by Shalex
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)