Skip to content

Commit

Permalink
Source is not alias
Browse files Browse the repository at this point in the history
Or rather, it isn't when it's a plugin model - set to the registry alias
so that hydrated results know from which table class they were created.
  • Loading branch information
AD7six committed Feb 17, 2015
1 parent 4911a53 commit 8364de8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/ResultSet.php
Expand Up @@ -472,7 +472,7 @@ protected function _groupResult($row)
$results[$defaultAlias]['_matchingData'] = $results['_matchingData'];
}

$options['source'] = $defaultAlias;
$options['source'] = $this->_defaultTable->registryAlias();
$results = $results[$defaultAlias];
if ($this->_hydrate && !($results instanceof Entity)) {
$results = new $this->_entityClass($results, $options);
Expand Down

0 comments on commit 8364de8

Please sign in to comment.