dotConnect for Oracle: Decimal is read instead of Int32
Posted: 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
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):
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)
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
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"