vendor/cakephp/cakephp/src/ORM/Association/HasMany.php 1 location
|
@@ 136-140 (lines=5) @@
|
133 |
|
return $entity; |
134 |
|
} |
135 |
|
|
136 |
|
if (!is_array($targetEntities) && !($targetEntities instanceof Traversable)) { |
137 |
|
$name = $this->property(); |
138 |
|
$message = sprintf('Could not save %s, it cannot be traversed', $name); |
139 |
|
throw new InvalidArgumentException($message); |
140 |
|
} |
141 |
|
|
142 |
|
$foreignKey = (array)$this->foreignKey(); |
143 |
|
$properties = array_combine( |
vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php 1 location
|
@@ 579-583 (lines=5) @@
|
576 |
|
} |
577 |
|
unset($options['associated'][$this->_junctionProperty]); |
578 |
|
|
579 |
|
if (!(is_array($entities) || $entities instanceof Traversable)) { |
580 |
|
$name = $this->property(); |
581 |
|
$message = sprintf('Could not save %s, it cannot be traversed', $name); |
582 |
|
throw new InvalidArgumentException($message); |
583 |
|
} |
584 |
|
|
585 |
|
$table = $this->target(); |
586 |
|
$original = $entities; |