Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gwoo committed Mar 4, 2009
1 parent 1654c3f commit 7dc627d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cake/libs/model/model.php
Expand Up @@ -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;
Expand Down

0 comments on commit 7dc627d

Please sign in to comment.