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
This commit is contained in:
gwoo 2009-03-04 01:36:53 +00:00
parent 1654c3f339
commit 7dc627dd19

View file

@ -1277,8 +1277,12 @@ class Model extends Overloadable {
'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;