it's already supported by EOF -- if you set your relationships to be "outer 
join" in entity modeler, it should fix this.

i've been thinking that we should default any optional to-one relationship to 
be a left outer join in entity modeler, actually.

ms

On Oct 15, 2010, at 9:14 AM, Kieran Kelleher wrote:

> An old issue, but just wanted to throw this out there for discussion.
> 
> If I do a query (against MySQL db) where some of the keypaths cross optional 
> relationships, then the results will exclude master entity instances where 
> the optional detail does not exist. This is because of the SQL generated (for 
> the default MySQL plugin anyway) does its table joins using WHERE t0.id = 
> t1.idForeignKey style expressions.
> 
> 
> So, how do others deal with this?
> 
> Is this an EOF problem or a MySQL plugin problem? Do other databases/plugins 
> exhibit this same problem? .... or do they automatically generate LEFT JOIN 
> between the master entity table and the related tables as derived from the 
> keyPaths?
> 
> Is it straightforward to implement, or a huge task?  ..... is a case of just 
> adding this functionality to the MySQLExpression (extends JDBCExpression) 
> class, and overriding assembleJoinClause? Does EOF actually send the 
> appropriate left-outer or right-outer join semantic to that method when 
> appropriate anyway? Must I configure left outer join semantics in the EOModel 
> in advance for my optional detail relationships for this to work?
> 
> Pointers, advice, experiences would be much appreciated :-)
> 
> -Kieran
> 
> 
> 
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40pobox.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to