Skip to content

Commit 58f2102

Browse files
committed
maintain ModelAlias.field_name in conditions to avoid ambiguity error.
1 parent cf0d6e6 commit 58f2102

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Model/Behavior/SearchableBehavior.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ protected function _fillChunk ($Model, $offset, $limit, $id = null) {
280280
}
281281
} else {
282282
if ($id) {
283-
$params['conditions'][$Model->primaryKey] = $id;
283+
$params['conditions'][$Model->alias . '.' . $Model->primaryKey] = $id;
284284
} else {
285285
$params['offset'] = $offset;
286286
if (empty($params['limit'])) {

0 commit comments

Comments
 (0)