Number(12) mapped to Double?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
mr_fsx
Posts: 6
Joined: Wed 24 Sep 2008 12:43

Number(12) mapped to Double?

Post by mr_fsx » Wed 24 Sep 2008 12:48

Hello!

I wonder why Number(12) is mapped to Double? Shouldn't it be mapped to Int64?
I noticed that this applies for Number(10) and above up to Number(18) or something like that.

I also noticed that Number(1) maps to Int32. Shouldn't it be mapped to Int16?

We are using OraDirect v. 4.75.42 with Schema Modeller 1.0.22.0.

Regards
Anders

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

Post by Shalex » Fri 26 Sep 2008 11:09

We will investigate this situation and consider the possibility of changing such mapping in the future. You always can change the type of the property in the Property window of Schema Modeler.

sam
Posts: 4
Joined: Thu 23 Apr 2009 09:29

converting of type number

Post by sam » Thu 23 Apr 2009 10:55

Hello,
We consider using the dotConnect provider, replacing Oracle.DataAccess.Client.

Doing some tests, i came up against the same problem:
NUMBER(10) is converted to double.

When are you doing something about that?

I'm using dotConnect for Oracle 5.20 Beta

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

Post by AndreyR » Thu 23 Apr 2009 14:12

The type mappings are defined by non-customizable Provider Manifest.
There are two alternatives at the moment.
The first one is to edit the standard .edmx model manually using XML Editor and set the type of the NUMBER(10) column to the value you like.
Instead of that you can use our Entity Developer visual tool to generate the .edml model and edit the Type property of the column.

sam
Posts: 4
Joined: Thu 23 Apr 2009 09:29

Post by sam » Fri 24 Apr 2009 05:51

We're not using Entities(historically...). What i'm doing is generating DataTables using the FillSchema(DataTable) Method of the Devart.Data.Oracle.OracleDataAdapter.

Is there another possibility or workaround to satisfy my needs?

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

Post by Shalex » Mon 27 Apr 2009 07:50

Code: Select all

da.FillSchema(table, SchemaType.Mapped);
table.Columns["Number_10_column"].DataType = System.Type.GetType("System.Int64");
Does this workaround suit your needs?

sam
Posts: 4
Joined: Thu 23 Apr 2009 09:29

Post by sam » Mon 27 Apr 2009 09:19

No. Changing the types of each column manually would be painful. In addition i'm generating the DataTable by a RefCursor of a StoredProcedure, so i can't read the db-scheme and do the mapping by myself :-(

Id would be sufficient, if you provide an event (or something) on the OracleDataAdapter class, where the type-mapping can be changed... Could this be a possible solution?

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

Post by Shalex » Wed 29 Apr 2009 15:56

We will investigate the issue and implement this functionality in the nearest future. These will be rather the options of the connection level.

sam
Posts: 4
Joined: Thu 23 Apr 2009 09:29

Post by sam » Thu 30 Apr 2009 09:22

Even better! When can i reckon with this feature?

Thanks!

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

Post by Shalex » Thu 30 Apr 2009 11:32

We cannot provide any timeframe at the moment. I will notify you on the first available result related to this issue.

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

Post by Shalex » Fri 10 Jul 2009 13:45

Mapping option at the connection level is implemented. Look forward to the next build of dotConnect for Oracle.

rally25rs
Posts: 1
Joined: Wed 09 Dec 2009 15:49

Post by rally25rs » Wed 09 Dec 2009 16:02

I am in the process of evaluating dotConnect for Oracle as a possible LINQ provider for the company that I work for. In the process of doing so, I found this same issue.

In my case, I generated the data classes using the Devart Linq2SQL Generator UI tool, and .lqml file.

This seems to do the following conversion:
NUMBER(15,0) -> double
The standard Oracle ODP.NET driver would consider this a long (Int64).

I am using dotConnect v 5.35. Is there a way to change these mappings without manually changing it for every table and column in the mapping? We would be mapping hundreds of tables and procedures, so doing this by hand would basically be out of the question.

Thanks for any information.

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

Post by AndreyR » Wed 09 Dec 2009 16:20

We are working on an option that will help to solve this situation.
Unfortunately, I don't have any timeframe for it to be implemented.

Post Reply