Re: How can I fix WO5 outer Join syntax?
Re: How can I fix WO5 outer Join syntax?
- Subject: Re: How can I fix WO5 outer Join syntax?
- From: Jonathan Rochkind <email@hidden>
- Date: Mon, 31 Mar 2003 11:25:42 -0600
I think you probably want to write your own JDBCPlugIn (or sub-class an
existing Apple provided JDBCPlugIn class, if you are using one), rather
than trying to write your own adaptor class.
But I've never done what you are trying to do, and am not sure how hard it
would be. Looking at the JDBCPlugIn API, it looks like there's no easy way
to do what you want, and you'd actually have to write your own
EOSQLExpressionFactory class, in order to provide your own EOSQLExpression
class(es), in order to do the joins properly. You could sub-class Apple's
code, so you wont' need to reimplement everything from scratch, in the end
you'll probably only need a few lines of code, but it'll be a pain to
figure out _which_ few lines of code where. :)
But I think a custom JDBCPlugIn, possibly which returns a custom
EOSQLExpressionFactory (which itself returns custom EOSQLExpressions) is
the 'right' way to go, rather than (re)writing an adaptor.
--Jonathan
At 12:51 PM 3/29/2003 -0500, Bob Stuart wrote:
Hi all,
WO5.2 on OSX or Windows. It appears that ODBCSQLExpression in
WO4.5 did a more current syntaxt for outer Joins. It did the style of :
from {oj table1 t0 LEFT OUTER JOIN table2 t1 ON t0.att1 = t1.att1}
I know the {} and the oj are ODBC stuff the rest is normal sql. In WO5 I get
from table1 t0, table2 t1 where t0.att1 *= t1.att1
This does not work for DB2 or I think most other recent databases. I know
I can override with my own adaptor most/all of the sql generation. Has
anyone done this already. Can I get my hands on what ODBCSQLExpression did
do in the past? I don't mind recoding OBJ C into Java to do it. I'm
porting a 4.5 to 5 and this is a real pain. I don't want to go to raw sql
for every left join I have. I already have a custom adaptor and
sqlExpression so all I need is the logic. I hate trying to reverse
engineer the logic when it was already done and done apparently correctly.
The ODBC syntax does work fine for DB2.
--
Bob Stuart
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.