Skip to content
Permalink
Browse files

Making btm marshalling use table aliases

  • Loading branch information...
Patrick Conroy
Patrick Conroy committed Jun 23, 2015
1 parent 1422d39 commit 44fbc41911ca737e3e5968204fc152fa14ae05b4
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/ORM/Marshaller.php
@@ -295,7 +295,9 @@ protected function _belongsToMany(Association $assoc, array $data, $options = []
if (array_intersect_key($primaryKey, $row) === $primaryKey) {
$keys = array_intersect_key($row, $primaryKey);
if (count($keys) === $primaryCount) {
$conditions[] = $keys;
foreach ($keys as $key => $value) {
$conditions[][$assoc->alias() . '.' . $key] = $value;
}
}
} else {
$records[$i] = $this->one($row, $options);

0 comments on commit 44fbc41

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