|
Hi Gilles.
Like the other tests that cast the result object to int, the object being returned in the ComplexType test is of type System.Decimal (even though the SQL script for Oracle table defines the column’s data type as an INTEGER).� It’s basically the same issue as when returning the selectKey result.� Doing a round(columnname, 0) or round (sequencename, 0) or to_number(columnname) or to_number(columnname, ‘9999999’) or to_number(columnname, someothernondecimalmask) still returns a System.Decimal.� I think it’s really due to Oracle, the way it handles numbers, and the provider.�
I am pretty satisfied with the test results and the various workarounds since OracleClient is still MUCH better at these tests than the ODP.� For example, the following is an Account insert parameter map that works for BOTH MSSQL SqlClient and OracleClient:
<parameterMap id="insert-params"> ����� <parameter property="Id" /> ����� <parameter property="FirstName" /> ����� <parameter property="LastName" />�� ����� ����� ����� <parameter property="EmailAddress" nullValue="[EMAIL PROTECTED]"/> </parameterMap>
These nice and easy parameter maps will not work for ODP.� It requires the tedious work of specifying column types and sizes (for VARCHAR2(xx) or NUMBER(xx,x)) as in the following version that does work with ODP:
<parameterMap id="insert-params"> ����� <parameter property="Id" dbType="Int32"/> ����� <parameter property="FirstName" dbType="VarChar2" size="32" /> ����� <parameter property="LastName" dbType="VarChar2" size="32" />���� ����� ����� ����� <parameter property="EmailAddress" dbType="VarChar2" size="128" nullValue="[EMAIL PROTECTED]"/> </parameterMap>
So, I’m pretty happy that there are only a few issues with OracleClient since ODP requires a lot of mind-numbing specifications to start it running the tests.
Roberto
-----Original Message-----
Hy Roberto,
I have closed the Jira-14 and applied your patch. I have begun to look to yours comments in the mapping files. In oracleClient/Complex.xml, I don’t understand why the test don’t pass, why the cast to int is invalid ? Which type result object the QueryForObject is returned ? I will study yours others comments.
For the DAO ADO tests, I have created a special directory for ADO MSSQL and Oracle (to be filled). By the way, you can add your ODP.NET tests in SVN and added some for MySQL with ByteFx as the connector/NET 1.0.3 is not working in the NPethsop.
I have completed the DAO Guide.
-Gilles
De :
roberto [mailto:[EMAIL PROTECTED]
Gilles, you’ve probably seen that they’ve been checked into SVN. Most of the test errors are now coming from Hashtable results and cast exceptions. There are workarounds to make them pass if we modify the test assertions slightly and add string helper properties for Ids (plus the JIRA-14 note). If we do that, I’d say almost all of the tests pass.
The DAO ADO tests are made for MSSQL so they don’t pass, but if a project is going to use ADO for Oracle, then the actual ADO calls aren’t iBATIS.NET-related anyway. And actually, I don’t have Oracle MTS dll installed so I haven’t gone through the TransactionScope tests (although all the basic SqlMap transaction tests do pass).
The biggest item may be the Oracle stored proc test error for inserting an account record with the way a return param is handled and the way param names are generated. I wrote up the error explanation as a comment in the Account SqlMap file. The good thing is that the System.Data.OracleClient.OracleCommandBuilder does have the DeriveParameters method, which the ODP.NET provider does not have.
Anyway, I can add ODP.NET tests if we want to have those available too…or I can look into getting the MySQL tests up and running first (ByteFX or Connector/Net?). Not sure which db/provider test combo is in more demand by folks who need examples.
Oh, are you adding more to the DAO guide? I can format (remove those pesky tabs) it and clean it up if it’s ready.
Merry Christmas (happy holidays) to everyone and have a happy new New Year!
Roberto
-----Original Message-----
Good, check in the SVN.
Merry Christmas to Everybody.
-Gilles
De :
roberto [mailto:[EMAIL PROTECTED]
Gilles / Ted,
I’m getting about 70+% of the NUnit tests passing using System.Data.OracleClient with some slight mods to the MSSQL-based SqlMap files (a good chunk of the errors are due to types of cast exceptions with numbers and dates). I can send the NUnit output if you’d like to see it (I don’t have NUnit2Report setup but someone may have it). Also, I can check the SqlMaps and config files into SVN or upload them into JIRA as needed.
Roberto -- -- -- -- |
- iBATIS.NET System.Data.OracleClient tests roberto
- RE: iBATIS.NET System.Data.OracleClient tests Gilles Bayon
- RE: iBATIS.NET System.Data.OracleClient tests roberto
- RE: iBATIS.NET System.Data.OracleClient tests Gilles Bayon
- roberto
