Currently, I'm trying to use SubSonic3 ORM (ActiveRecords mode) with the Oracle (ODP.NET) data provider and the T4 template to access an Oracle 10g (ver. 10.2.0.3.0) DB.
After dealing with a few minor glitches getting the templates to build the various code for me, I managed to get it all to compile and run, but I'm running into a problem with the Query that it generates for me.
Tracing/stepping thru the code, I took a look at what SQL query was being generated and found this:
SELECT [t0].[SOME_COLUMN], [t1].[ANOTHER_COLUMN]
FROM [USER].[SOME_TABLE] AS t0
CROSS JOIN [USER].[ANOTHER_TABLE] AS t1
WHERE ([t0].[ID] = [t1].[ID])
And my code was throwing an exception with an Oracle message of "Missing Expression: ORA-00936". So I tried running this query directly at the command-line and it error-ed out with the same message.
I then removed all the square brackets (which didn't look right to me) and both "AS" references (2nd and 3rd line) and the query ran fine.
Can someone explain to me why SubSonic is doing this? Or even better, how to fix this?
Thanks!
EDIT: I guess I should also ask (since I'm not an Oracle expert): Are the square-brackets normal/legal? What about the "AS" operator?
After doing some digging, I found that for Oracle (and possibly DB2) support, there is a fork from the trunk on SubSonic which has better support for these 2 databases. Follow this link: https://github.com/rally25rs/SubSonic-3.0
This source code appears to be the real deal.