Andrus Adamchik commented on CAY-560:
-------------------------------------
Per CAY-929, I implemented a big chunk of Mike's patch (I couldn't use the patch directly - it is too loaded). The two things that are NOT included are:
* Expression.fromString() support for OUTER JOINS
* Split joins (I am still unclear on the logic here... we can't automatically guess where to split the joins, and where to combine them, some explicit API for that)..
Maybe we should close this Jira and handle the two tasks above as separate new Jiras?
> Add support for outer joins
> ---------------------------
>
> Key: CAY-560
> URL: https://issues.apache.org/cayenne/browse/CAY-560
> Project: Cayenne
> Issue Type: New Feature
> Components: Cayenne Core Library
> Reporter: Øyvind Harboe
> Assignee: Mike Kienenberger
> Fix For: 1.2 [STABLE]
>
> Attachments: 1.2-outerjoin-null-2006-09-05-01.txt, cayenne-2.0-patch-outerjoin-null-audit-customexp.txt
>
>
> Currently outer joins are not supported.
> See thread:
> http://objectstyle.org/cayenne/lists/cayenne-user/2006/05/0165.html
> // This Java code will result in the SQL query immediately below...
> SelectQuery query1=new SelectQuery(ElcRole.class);
> query1.setQualifier(ExpressionFactory.matchExp(ElcRole.ELC_ROLEMEMBER_ARRAY_PROPERTY + "." + ElcRolemember.TO_SYS_USER_PROPERTY, getSysUser()).
> orExp(ExpressionFactory.matchExp(ElcRole.TO_SYS_USER_PROPERTY, getSysUser())));
> List l=context.performQuery(query1);
> Generates =>
>
> SELECT DISTINCT t0.ELCROLE_NAME, t0.ELCROLE_ID, t0.SYSUSER_ID
> FROM ELC_ROLE t0 LEFT OUTER JOIN
> ELC_ROLEMEMBER t1 ON t0.ELCROLE_ID = t1.ELCROLE_ID
> WHERE (t1.SYSUSER_ID = 'BD93F348-8C02-4742-BA97-2456E5CD3881') OR
> (t0.SYSUSER_ID = 'BD93F348-8C02-4742-BA97-2456E5CD3881')
> But should(?) have generated =>
> SELECT DISTINCT t0.ELCROLE_NAME, t0.ELCROLE_ID, t0.SYSUSER_ID
> FROM ELC_ROLE t0 LEFT OUTER JOIN
> ELC_ROLEMEMBER t1 ON t0.ELCROLE_ID = t1.ELCROLE_ID
> WHERE (t1.SYSUSER_ID = 'BD93F348-8C02-4742-BA97-2456E5CD3881') OR
> (t0.SYSUSER_ID = 'BD93F348-8C02-4742-BA97-2456E5CD3881')
>
-- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
This archive was generated by hypermail 2.0.0 : Tue Apr 29 2008 - 17:31:45 EDT