On 7/28/06 8:43 PM, Jonathan Vanasco wrote:
> My code below creates SQL that is essentially:
> SELECT t1.* , t2.* FROM useraccount_link t1 LEFT OUTER JOIN
> useraccount_link_privacysetting_override t2 ON(t1.id =
> t2.useraccount_link_id)
> WHERE
> t1.is_deleted = false AND
> t1.useraccount_id =  129 AND
> t1.id <> 161 AND
> (
> t2.useraccount_link_id = 161 OR
> t2.useraccount_link_id IS NULL
> )
> 
> I've spent all day trying to get the results, not realize that I was
> after a conditional join all along
> SELECT t1.* , t2.* FROM useraccount_link t1 LEFT OUTER JOIN
> useraccount_link_privacysetting_override t2 ON
> (
> (t1.id = t2.useraccount_link_id) AND
> (
> t2.useraccount_link_id = 161 OR
> t2.useraccount_link_id IS NULL
> )
> )
> WHERE
> t1.is_deleted = false AND
> t1.useraccount_id =  129 AND
> t1.id <> 161
> 
> is there anything in rose that will let me explicitly control the
> join at run time?

Join conditions are determined by the relationship or fk metadata, and they
do not currently support nested boolean logic.  But it shouldn't matter
whether those conditions are in the ON (...) clause or in the WHERE clause,
should it?  The results should be the same.  What database are you using?

If a were to add the ability to augment the join conditions in a Manager
query, what would the syntax be like?

-John



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to