Skip to content
Permalink
Browse files

Removed unnecessary _primary option

  • Loading branch information...
jeremyharris committed May 1, 2018
1 parent 58bb5f4 commit 14a48c65abec28c2392c57f7570b4ba5b6331cd7
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/ORM/Table.php
@@ -1678,14 +1678,13 @@ public function findOrCreate($search, callable $callback = null, $options = [])
$options += [
'atomic' => true,
'defaults' => true,
'_primary' => true,
];
$entity = $this->_executeTransaction(function () use ($search, $callback, $options) {
return $this->_processFindOrCreate($search, $callback, $options);
}, $options['atomic']);
if ($entity && $this->_transactionCommitted($options['atomic'], $options['_primary'])) {
if ($entity && $this->_transactionCommitted($options['atomic'], true)) {
$this->dispatchEvent('Model.afterSaveCommit', compact('entity', 'options'));
}

0 comments on commit 14a48c6

Please sign in to comment.
You can’t perform that action at this time.