Re: EOF Generates Incorrect SQL for Outer Joins on MySql

Lee Harvey Osmond <[email protected]>
Newsgroups gmane.comp.web.webobjects.eof
Message-ID <[email protected]>
> Since my post on October 3rd, regarding incorrect sql generation for  
> outer
> joins on MySql, I have received only one response confirming that the  
> Sql92
> requirement of MySql is correct, but no information on the problem or
> solution.
>
> So, I was wondering, does this mean that very few of you out there are  
> using
> EOF with MySql, even though it comes packaged with Mac OS X Server?   
> Is this
> the reasons why?
>
> Sincerely,
>
> Eric Bergerson

I've no idea how many people are using MySQL on MacOSX[S], with or  
without EOF.  From my own experience, the need for outer joins is  
something of a rarity in EOF, and that might explain a lack of other  
comment.

My preferred fix would be to subclass  
com.webobjects.jdbcadaptor.MySQLPlugIn.MySQLExpression and override  
com.webobjects.eoaccess.EOSQLExpression.assembleJoinClause(String,String 
,int) so that if the int was the right constant, after calling super()  
we'd replace " *= " with the expression in your previous post you said  
was needed.

It's worth observing that the core of EOF rarely generates SQL  
directly; it generally invokes methods in adaptor-specific subclasses,  
which occasionally rely on EOF's default implementations.  Creating  
your own adaptor/plugin subclasses of the adaptor/plugin you're using  
can afford some wonderful opportunities for bugfixing, additional  
delegation, diagnostics, etc etc.

What you've seen should probably be reported as a bug in the MySQL  
plugin; for all I know, it may already have been fixed in some upcoming  
release of WO.


-- lho
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.