oibo8x / subsonicproject

Automatically exported from code.google.com/p/subsonicproject
0 stars 0 forks source link

Wrong Select Commands when using Oracle Provider #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
 - What steps will reproduce the problem?

1. Using an Oracle database with SubSonic 2.1
2. Create a parametrized query or use FetchByParameter to query your 
oracle database

 - What is the expected output? What do you see instead?

Is expected a collection of objects representing those records that match 
you parameter clause.
Instead of this, one exception is thrown by Oracle provider 
(System.Data.Oracle) that sais there's one error in the Sql Command.

 - What version of the product are you using? On what operating system?

SubSonic 2.1 on Windows Vista or XP or 2003 and Oracle 10g and 11g

The problem I've found is that the Sql command generated by SubSonic is 
really Wrong, it's being generated with this structure:

SELECT TABLENAME.FIELD1, TABLENAME.FIELD2 FROM TABLENAME WHERE 
SCHEMA.TABLENAME.FIELD1 = :PARAM

As you can see it puts the SCHEMA (OWNER) of the Oracle database before 
the field names in the where clauses and didn't put it before the 
TABLENAME.

Original issue reported on code.google.com by apaganu...@gmail.com on 20 Nov 2008 at 5:19

GoogleCodeExporter commented 9 years ago
I've correct this problem made two small changes in two SubSonic 2.1 source 
files 
(attached):

- DataProviders\OracleDataProvider.cs (method GetSelectSql)
- DataProviders\DataProvider.cs (method BuildWhere)

Original comment by apaganu...@gmail.com on 20 Nov 2008 at 5:22

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for the fix - can you tell me a bit more? Also - checkout the latest 
source and see if the problem still exists. I've applied 3 Oracle patches in 
the 
last week so this might be dealt with.

Finally - I need a patch so I don't overwrite the changes made.

Original comment by robcon...@gmail.com on 9 Apr 2009 at 2:02

GoogleCodeExporter commented 9 years ago
Closing - I think we've fixed this issue. If not please re-open and let me know 
what 
these patches do :)

Original comment by robcon...@gmail.com on 11 Apr 2009 at 1:44