diff --git a/VERSION.txt b/VERSION.txt index 683cad369..495f45a23 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -6,4 +6,4 @@ // +---------------------------------------------------------------------------------------------------+ // /////////////////////////////////////////////////////////////////////////////////////////////////////////// -0.10.4.1682_beta \ No newline at end of file +0.10.4.1684_beta \ No newline at end of file diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index b39dd2f1d..e7e537f85 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -1182,7 +1182,7 @@ class Model extends Object $tmpSQL = "SELECT {$this->{$association.'_fields'}} FROM {$this->{$model}->table} AS `{$association}` WHERE ({$this->{$association.'_foreignkey'}}) = '{$value2[$this->primaryKey]}'" - .($oneToManyConditions? " {$oneToManyConditions}":null) + .($oneToManyConditions? "AND {$oneToManyConditions}":null) .($oneToManyOrder? " ORDER BY {$oneToManyOrder}": null); }