From 7dc627dd1999d9696317aa16a1826d01d43b1993 Mon Sep 17 00:00:00 2001 From: gwoo Date: Wed, 4 Mar 2009 01:36:53 +0000 Subject: [PATCH] refs #4119, another check for binary uuid git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8074 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/model.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index e632a8f2f80..b686c25ebf8 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -1277,8 +1277,12 @@ function __saveMulti($joined, $id) { 'fields' => $this->hasAndBelongsToMany[$assoc]['associationForeignKey'] )); - $isUUID = !empty($this->{$join}->primaryKey) && (($this->{$join}->_schema[$this->{$join}->primaryKey]['type'] === 'string' && $this->{$join}->_schema[$this->{$join}->primaryKey]['length'] === 36) - || ($this->{$join}->_schema[$this->{$join}->primaryKey]['type'] === 'binary' && $this->{$join}->_schema[$this->{$join}->primaryKey]['length'] === 16)); + $isUUID = !empty($this->{$join}->primaryKey) && ( + $this->{$join}->_schema[$this->{$join}->primaryKey]['length'] === 36 && ( + $this->{$join}->_schema[$this->{$join}->primaryKey]['type'] === 'string' || + $this->{$join}->_schema[$this->{$join}->primaryKey]['type'] === 'binary' + ) + ); $newData = $newValues = array(); $primaryAdded = false;