dotConnect for Oracle: Decimal is read instead of Int32

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Dennis Wanke
Posts: 57
Joined: Tue 11 Mar 2014 07:49

dotConnect for Oracle: Decimal is read instead of Int32

Post by Dennis Wanke » Tue 11 Mar 2014 14:40

The second showstopper we’ve encountered recently when evaluating dotConnect for Oracle 8.3.115 (in Direct Mode) with Entity Framework 5.0 is about data values of the wrong type being read from EntityDataReader under certain circumstances (Decimal instead of Int32).

Given a typical Invoice/InvoiceLine entity model and the following ESQL query

Code: Select all

SELECT VALUE COUNT (
  SELECT VALUE 0 FROM invoice.Lines
  ) AS Lines 
FROM InvoiceData.Invoices AS invoice
values of type System.Decimal are returned when reading the query results with EntityDataReader (when calling reader.GetValue(0).GetType()), instead of Int32 type being expected and reported by metadata (reader.GetDataTypeName(0) returns “Edm.Int32” and reader.GetFieldType(0).FullName returns “System.Int32”).

The issue is not observed with both SQL Server and SQL CE data providers.

Please confirm that it is a bug in dotConnect for Oracle and provide some estimation if it can (and is going to be) fixed in the coming releases. Your answer will help us making a decision about adopting your provider for our product.

ADDENDUM: we just have spotted another case with a similar issue being involved. The following ESQL query selects two columns of type EntityKey, that are semantically equivalent (reference of Invoice type). However, the member value of the first key (Invoice.Id) is Int32 (which is correct) while the member of the second key is Decimal (should be Int32 too):

Code: Select all

  SELECT REF(invoice)
  , REF(ANYELEMENT(
    select value top(1) tmp from (    -- ***
      (SELECT VALUE line.Invoice FROM invoice.Lines AS line)
    ) as tmp    -- ***
  )) 
  FROM InvoiceData.Invoices AS invoice"
Note, if you delete two query lines marked with -- *** (i.e. the wrapping query), the problem disappears (given there is no more than one invoice line per invoice, otherwise the other issue is hit: http://forums.devart.com/viewtopic.php?f=1&t=29135)

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

Re: dotConnect for Oracle: Decimal is read instead of Int32

Post by Shalex » Fri 14 Mar 2014 16:52

Please try mapping the needed data types with the Number Mappings connection string parameter: http://www.devart.com/dotconnect/oracle ... tring.html.

If this doesn't help, send us a small test project with the corresponding DDL/DML script.

Dennis Wanke
Posts: 57
Joined: Tue 11 Mar 2014 07:49

Re: dotConnect for Oracle: Decimal is read instead of Int32

Post by Dennis Wanke » Tue 18 Mar 2014 10:27

I don't really see how Number Mappings can help in this case. I sent you a test project.

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

Re: dotConnect for Oracle: Decimal is read instead of Int32

Post by Shalex » Wed 26 Mar 2014 15:26

The bug with determining correct datatypes of data retrieved by some EntitySQL queries is fixed. We will notify you when the corresponding build of dotConnect for Oracle is available for download.

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

Re: dotConnect for Oracle: Decimal is read instead of Int32

Post by Shalex » Thu 27 Mar 2014 15:56

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

Dennis Wanke
Posts: 57
Joined: Tue 11 Mar 2014 07:49

Re: dotConnect for Oracle: Decimal is read instead of Int32

Post by Dennis Wanke » Fri 28 Mar 2014 09:58

Unfortunately, the issue is till reproducible in a bit different case. I've modified my test project to cover this case too.

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

Re: dotConnect for Oracle: Decimal is read instead of Int32

Post by Shalex » Mon 31 Mar 2014 08:18

Thank you for your report. We will notify you when the issue is fixed.

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

Re: dotConnect for Oracle: Decimal is read instead of Int32

Post by Shalex » Wed 09 Apr 2014 14:09

Determining correct datatypes of data retrieved by EntitySQL queries with UNION ALL and similar constructions is improved. We will notify you when the corresponding build of dotConnect for Oracle is available for download.

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

Re: dotConnect for Oracle: Decimal is read instead of Int32

Post by Shalex » Thu 10 Apr 2014 14:55

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

Dennis Wanke
Posts: 57
Joined: Tue 11 Mar 2014 07:49

Re: dotConnect for Oracle: Decimal is read instead of Int32

Post by Dennis Wanke » Fri 11 Apr 2014 08:58

I confirm the issue is now fixed.

Post Reply