Integer(0) mapped to Boolean is incorrect
Posted: Wed 10 Nov 2010 18:11
In summary - how can I change the default data type mapping for an Entity Data Model generated when using dotConnect for Oracle? Number(0) which can hold values from 0 to 9 is being mapped to a Boolean. I need this to be something like Byte so that the value is not lost.
The details:
I am using Devart dotConnect for Oracle to create an ADO.NET Entity Data Model (which is then exposed as a WCF Data Service).
The Oracle data type Integer(0) is being mapped to bool (SSDL), Boolean (CSDL) and System.Boolean (.NET). This is as defined in the 'Entity Framework Data Type Mapping'.
However this data type can store a single digit number (from 0 to 9) in Oracle. Mapping this to a Boolean provides True or False.
The Oracle database that I am connecting to uses values in the full range of 0 to 9 so mapping this to a Boolean loses this information.
I cannot change the Oracle database schema and I need the Entity Data Model to create entities that can manage values from 0 to 9.
How can I change the default mapping to map Number(0) in Oracle to say Byte in .NET? I understand that Byte could hold values larger than 9 but I just need an automatic type that covers all possible values inthe database.
This needs to be automatic in the model generation as there are hundreds of tables with Number(0) fields.
Hoping for a quick response - it will be very much appreciated.
The details:
I am using Devart dotConnect for Oracle to create an ADO.NET Entity Data Model (which is then exposed as a WCF Data Service).
The Oracle data type Integer(0) is being mapped to bool (SSDL), Boolean (CSDL) and System.Boolean (.NET). This is as defined in the 'Entity Framework Data Type Mapping'.
However this data type can store a single digit number (from 0 to 9) in Oracle. Mapping this to a Boolean provides True or False.
The Oracle database that I am connecting to uses values in the full range of 0 to 9 so mapping this to a Boolean loses this information.
I cannot change the Oracle database schema and I need the Entity Data Model to create entities that can manage values from 0 to 9.
How can I change the default mapping to map Number(0) in Oracle to say Byte in .NET? I understand that Byte could hold values larger than 9 but I just need an automatic type that covers all possible values inthe database.
This needs to be automatic in the model generation as there are hundreds of tables with Number(0) fields.
Hoping for a quick response - it will be very much appreciated.