Skip to content

Commit ee7b95a

Browse files
committed
Inserted apostrophes, delete by UUID
Inserted apostrophes to fix deletion by string columns (e.g. UUIDs)
1 parent 0ea547e commit ee7b95a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RelationTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ public function deleteWithRelated()
254254
$isCompositePK = (count($relPKAttr) > 1);
255255
foreach ($link as $key => $value) {
256256
if (isset($this->$value)) {
257-
$array[$key] = $key . ' = ' . $this->$value;
257+
$array[$key] = "$key = '{$this->$value}'";
258258
}
259259
}
260260
$error = !$this->{$data['name']}[0]->deleteAll(implode(' AND ', $array));

0 commit comments

Comments
 (0)