Page 1 of 1

Number(12) mapped to Double?

Posted: Wed 24 Sep 2008 12:48
by mr_fsx
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

Posted: Fri 26 Sep 2008 11:09
by Shalex
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.

converting of type number

Posted: Thu 23 Apr 2009 10:55
by sam
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

Posted: Thu 23 Apr 2009 14:12
by AndreyR
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.

Posted: Fri 24 Apr 2009 05:51
by sam
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?

Posted: Mon 27 Apr 2009 07:50
by Shalex

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?

Posted: Mon 27 Apr 2009 09:19
by sam
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?

Posted: Wed 29 Apr 2009 15:56
by Shalex
We will investigate the issue and implement this functionality in the nearest future. These will be rather the options of the connection level.

Posted: Thu 30 Apr 2009 09:22
by sam
Even better! When can i reckon with this feature?

Thanks!

Posted: Thu 30 Apr 2009 11:32
by Shalex
We cannot provide any timeframe at the moment. I will notify you on the first available result related to this issue.

Posted: Fri 10 Jul 2009 13:45
by Shalex
Mapping option at the connection level is implemented. Look forward to the next build of dotConnect for Oracle.

Posted: Wed 09 Dec 2009 16:02
by rally25rs
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.

Posted: Wed 09 Dec 2009 16:20
by AndreyR
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.