Skip to content
Permalink
Browse files

Always map association fields.

This ensures that association fields are in the typemap to cover cases
where fields are used in conditions for the matching() clause.

Refs #8147
  • Loading branch information...
markstory committed Feb 3, 2016
1 parent ae5b1bf commit 501358c7a9481e92be18aa28d35331675ba25b2b
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/ORM/Association.php
  2. +1 −1 tests/TestCase/ORM/EagerLoaderTest.php
@@ -719,8 +719,8 @@ protected function _appendFields($query, $surrogate, $options)
if (!empty($fields)) {
$query->select($query->aliasFields($fields, $target->alias()));
$query->addDefaultTypes($target);
}
$query->addDefaultTypes($target);
}
/**
@@ -170,7 +170,7 @@ public function testContainToJoinsOneLevel()
'type' => 'LEFT',
'conditions' => new QueryExpression([
['clients.id' => new IdentifierExpression('foo.client_id')],
], $this->clientsTypeMap)
], new TypeMap($this->clientsTypeMap->defaults()))
]])
->will($this->returnValue($query));

0 comments on commit 501358c

Please sign in to comment.
You can’t perform that action at this time.