We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3a25e90 + f03845b commit 0ea547eCopy full SHA for 0ea547e
RelationTrait.php
@@ -195,7 +195,7 @@ public function saveAll($skippedRelations = [])
195
$isManyMany = count($relModel->primaryKey()) > 1;
196
if($isManyMany){
197
foreach ($rel['link'] as $k => $v) {
198
- $condition[] = $k . " = " . $this->$v;
+ $condition[] = "$k = '{$this->$v}'";
199
}
200
try {
201
$relModel->deleteAll(implode(" AND ", $condition));
@@ -206,7 +206,7 @@ public function saveAll($skippedRelations = [])
206
}else{
207
if($rel['ismultiple']){
208
209
210
211
212
0 commit comments