Adding insertQueryData fix for foreign keys = 0 (Ticket #1959)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4357 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-01-31 19:56:47 +00:00
parent 35f479f232
commit cedb56676f

View file

@ -418,7 +418,7 @@ class DataSource extends Object{
}
break;
}
if(empty($val)){
if(empty($val) && $val !== '0') {
return false;
}
$query = r($key, $this->value($val, $model->getColumnType($model->primaryKey)), $query);