1
0
mirror of synced 2025-01-31 20:41:44 +03:00

Updated Asset queries

Missing  braces and selected fields
This commit is contained in:
František Bereň 2014-07-31 09:01:58 +02:00
parent 458b953522
commit 54ac6a0535
3 changed files with 5 additions and 5 deletions

View File

@ -103,7 +103,7 @@ class CountWalkerTest extends PaginationTestCase
$query->setFirstResult(null)->setMaxResults(null);
$this->assertEquals(
"SELECT count(DISTINCT b0_.id) AS sclr_0 FROM BlogPost b0_ LEFT JOIN Category c1_ ON b0_.category_id = c1_.id", $query->getSql()
"SELECT count(DISTINCT b0_.id) AS sclr_0 FROM BlogPost b0_ LEFT JOIN Category c1_ ON (b0_.category_id = c1_.id)", $query->getSql()
);
}
}

View File

@ -80,7 +80,7 @@ class LimitSubqueryWalkerTest extends PaginationTestCase
$limitQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, array('Doctrine\ORM\Tools\Pagination\LimitSubqueryWalker'));
$this->assertEquals(
"SELECT DISTINCT m0_.id AS id_0 FROM MyBlogPost m0_ INNER JOIN Category c1_ ON m0_.category_id = c1_.id",
"SELECT DISTINCT m0_.id AS id_0 FROM MyBlogPost m0_ INNER JOIN Category c1_ ON (m0_.category_id = c1_.id)",
$limitQuery->getSql()
);
}
@ -94,7 +94,7 @@ class LimitSubqueryWalkerTest extends PaginationTestCase
$limitQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, array('Doctrine\ORM\Tools\Pagination\LimitSubqueryWalker'));
$this->assertEquals(
"SELECT DISTINCT m0_.id AS id_0, m0_.title AS title_1 FROM MyBlogPost m0_ INNER JOIN Category c1_ ON m0_.category_id = c1_.id ORDER BY m0_.title ASC",
"SELECT DISTINCT m0_.id AS id_0, m0_.title AS title_1 FROM MyBlogPost m0_ INNER JOIN Category c1_ ON (m0_.category_id = c1_.id) ORDER BY m0_.title ASC",
$limitQuery->getSql()
);
}

View File

@ -134,7 +134,7 @@ class WhereInWalkerTest extends PaginationTestCase
$whereInQuery->setHint(WhereInWalker::HINT_PAGINATOR_ID_COUNT, 10);
$this->assertEquals(
"SELECT b0_.id AS id_0 FROM BlogPost b0_ INNER JOIN Category c1_ ON b0_.category_id = c1_.id WHERE b0_.id IN (?)", $whereInQuery->getSql()
"SELECT b0_.id AS id_0, b0_.author_id AS author_id_1, b0_.category_id AS category_id_2 FROM BlogPost b0_ INNER JOIN Category c1_ ON (b0_.category_id = c1_.id) WHERE b0_.id IN (?)", $whereInQuery->getSql()
);
}
@ -147,7 +147,7 @@ class WhereInWalkerTest extends PaginationTestCase
$whereInQuery->setHint(WhereInWalker::HINT_PAGINATOR_ID_COUNT, 10);
$this->assertEquals(
"SELECT b0_.id AS id_0 FROM BlogPost b0_ INNER JOIN Category c1_ ON b0_.category_id = c1_.id WHERE 1 = 1 AND b0_.id IN (?)", $whereInQuery->getSql()
"SELECT b0_.id AS id_0, b0_.author_id AS author_id_1, b0_.category_id AS category_id_2 FROM BlogPost b0_ INNER JOIN Category c1_ ON (b0_.category_id = c1_.id) WHERE 1 = 1 AND b0_.id IN (?)", $whereInQuery->getSql()
);
}
}