$where=$this->tnames[$root]->getTableName().".".$this->tnames[$root]->getIdentifier()." IN (SELECT ".$fk->getLocal()." FROM ".$asf->getTableName()." WHERE ".$fk->getForeign()." IN (".$graph->getQuery()."))";
break;
endswitch;
}else
$this->load($reference);
}else
$this->load($reference);
}
return$where;
}
/**
* @param string $path the path of the loadable component
* @param integer $fetchmode optional fetchmode, if not set the components default fetchmode will be used
$this->join[$tname]="LEFT JOIN ".$tname2." ON ".$tname.".".$fk->getLocal()." = ".$tname2.".".$fk->getForeign();
$this->joined[]=$tname2;
$this->from[$tname]=true;
break;
endswitch;
}elseif($fkinstanceofDoctrine_Association){
$asf=$fk->getAssociationFactory();
switch($fk->getType()):
caseDoctrine_Relation::ONE_AGGREGATE:
caseDoctrine_Relation::ONE_COMPOSITE:
break;
caseDoctrine_Relation::MANY_AGGREGATE:
caseDoctrine_Relation::MANY_COMPOSITE:
//$this->addWhere("SELECT ".$fk->getLocal()." FROM ".$asf->getTableName()." WHERE ".$fk->getForeign()." IN (SELECT ".$fk->getTable()->getComponentName().")");