This commit is contained in:
parent
04d0ffb989
commit
a87e418354
@ -876,7 +876,7 @@ class Doctrine_Query2 extends Doctrine_Hydrate2 implements Countable
|
|||||||
. $joinCondition;
|
. $joinCondition;
|
||||||
|
|
||||||
if ($relation instanceof Doctrine_Relation_Association_Self) {
|
if ($relation instanceof Doctrine_Relation_Association_Self) {
|
||||||
$queryPart .= ' OR ' . $foreignTable . '.' . $table->getIdentifier() . ' = '
|
$queryPart .= ' OR ' . $foreignAlias . '.' . $table->getIdentifier() . ' = '
|
||||||
. $assocAlias . '.' . $relation->getLocal();
|
. $assocAlias . '.' . $relation->getLocal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class Doctrine_Query_Join_TestCase extends Doctrine_UnitTestCase
|
|||||||
}
|
}
|
||||||
public function testRecordHydrationWorksWithDeeplyNestedStructures()
|
public function testRecordHydrationWorksWithDeeplyNestedStructures()
|
||||||
{
|
{
|
||||||
$q = new Doctrine_Query();
|
$q = new Doctrine_Query2();
|
||||||
|
|
||||||
$q->select('c.*, c2.*, d.*')
|
$q->select('c.*, c2.*, d.*')
|
||||||
->from('Record_Country c')->leftJoin('c.City c2')->leftJoin('c2.District d')
|
->from('Record_Country c')->leftJoin('c.City c2')->leftJoin('c2.District d')
|
||||||
@ -77,7 +77,7 @@ class Doctrine_Query_Join_TestCase extends Doctrine_UnitTestCase
|
|||||||
}
|
}
|
||||||
public function testManyToManyJoinUsesProperTableAliases()
|
public function testManyToManyJoinUsesProperTableAliases()
|
||||||
{
|
{
|
||||||
$q = new Doctrine_Query();
|
$q = new Doctrine_Query2();
|
||||||
|
|
||||||
$q->select('u.name')->from('User u INNER JOIN u.Group g');
|
$q->select('u.name')->from('User u INNER JOIN u.Group g');
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ class Doctrine_Query_Join_TestCase extends Doctrine_UnitTestCase
|
|||||||
|
|
||||||
public function testSelfReferentialAssociationJoinsAreSupported()
|
public function testSelfReferentialAssociationJoinsAreSupported()
|
||||||
{
|
{
|
||||||
$q = new Doctrine_Query();
|
$q = new Doctrine_Query2();
|
||||||
|
|
||||||
$q->select('e.name')->from('Entity e INNER JOIN e.Entity e2');
|
$q->select('e.name')->from('Entity e INNER JOIN e.Entity e2');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user