Skip to content

Commit

Permalink
Implemented the select strategy for HasOne
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Apr 2, 2014
1 parent 10a501b commit dbe42f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Association/HasOne.php
Expand Up @@ -186,7 +186,7 @@ protected function _linkField($options) {
*/
protected function _buildResultMap($fetchQuery, $options) {
$resultMap = [];
$key = (array)$this->target()->primaryKey();
$key = (array)$options['foreignKey'];

foreach ($fetchQuery->all() as $result) {
$values = [];
Expand Down

0 comments on commit dbe42f9

Please sign in to comment.