Skip to content

Commit

Permalink
Implemented a simple eager loading for has many associations
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed May 19, 2013
1 parent 77645e1 commit 1040f3a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/Cake/Test/TestCase/ORM/QueryTest.php
Expand Up @@ -311,11 +311,11 @@ public function testContainResultFetchingOneLevel() {
}

/**
* Tests that results are grouped correctly when using contain()
* Tests that HasMany associations are correctly eager loaded
*
* @return void
**/
public function testThing() {
public function testHasManyEagerLoading() {
$this->_insertTwoRecords();

$query = new Query($this->connection);
Expand Down Expand Up @@ -345,16 +345,16 @@ public function testThing() {
'author' => [
'id' => 2,
'name' => 'Bruce Lee',
'article' => [
[
'article' => [
'id' => 2,
'title' => 'another title',
'body' => 'another body',
'author_id' => 2
]
'article' => [
[
'article' => [
'id' => 2,
'title' => 'another title',
'body' => 'another body',
'author_id' => 2
]
]
]
]
]
];
Expand Down

0 comments on commit 1040f3a

Please sign in to comment.