diff --git a/src/ORM/Table.php b/src/ORM/Table.php index 25f15488dff..1d6f9bff550 100644 --- a/src/ORM/Table.php +++ b/src/ORM/Table.php @@ -1222,7 +1222,7 @@ public function get($primaryKey, $options = []) */ public function findOrCreate($search, callable $callback = null) { - $this->connection()->transactional(function () use ($search, $callback) { + return $this->connection()->transactional(function () use ($search, $callback) { $query = $this->find()->where($search); $row = $query->first(); if ($row) {