Re: EOF & pgSQL join syntax
Re: EOF & pgSQL join syntax
- Subject: Re: EOF & pgSQL join syntax
- From: Chuck Hill <email@hidden>
- Date: Thu, 29 Apr 2004 21:13:57 -0700
I've never done this. As near as I can figure it...
EOSQLExpression has this method:
public String assembleJoinClause(String leftName,
String rightName,
int semantic)
This method is invoked from addJoinClause to return a JOIN clause. The
clause is of the form:
leftName operator rightName
where operator is "=" for an inner join, "*=" for a left-outer join, and
"=*" for a right-outer join.
Therein lies the "root of evil".
For our purposes we are interested in the subclass
com.webobjects.jdbcadaptor.JDBCExpression. You will need to subclass that,
and re-implement assembleJoinClause to do what you want. Who knows, you
might need to attend to some other methods as well. If there is a
PostgreSQL plugin, then it probably already has this class.
Then our task becomes, "How do I get EOF to use this expression class?".
Here is where Art's point comes into play.
com.webobjects.jdbcadaptor.JDBCPlugIn has the method
public Class defaultExpressionClass()
which you can use to the return the clase of your customized JDBCExpression
sub-class.
I *think* that should do it, but there are a few other methods that you
might want to look over if things don't work. Not trivial, but totally
doable.
Chuck
At 05:38 PM 29/04/2004 -1000, Art Isbell wrote:
>On Apr 29, 2004, at 2:46 PM, Arturo Pirez wrote:
>
>> In any case, I found a Radar for MySQL with the exact same issue in
>> the 5.2 release notes. There was no fix and no workaround. With this
>> added information, do you still think I can fix it in the plugin?
>
> I'd give it a try. This Radar states that the JDBC adaptor supports
>Oracle and Sybase. I'm guessing that it does so by testing for the
>database type and providing the correct operator. But the JDBC adaptor
>may not test for MySQL and PostgreSQL, so the default EOF outer join
>operator, "*=", is used which is invalid for MySQL and PostgreSQL.
>JDBC WO plugins should be able to deal with such things, I would think.
> But what do I know?
>
>Aloha,
>Art
>_______________________________________________
>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.
>
>
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
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.