src/Valkyrja/ORM/NativeEntityManager.php
public function commit(): bool
    {
        // Iterate through the models awaiting creation
        foreach ($this->createModels as $cid => $createModel) {
            // Create the model
            $this->getRepository(\get_class($createModel))->create($createModel);
            // Unset the model
            unset($this->createModels[$cid]);
        }

        // Iterate through the models awaiting save
        foreach ($this->saveModels as $sid => $saveModel) {
            // Save the model
            $this->getRepository(\get_class($saveModel))->save($saveModel);
            // Unset the model
            unset($this->saveModels[$sid]);
        }

        return $this->store()->commit();
    }
public function commit(): bool
    {
        // Iterate through the models awaiting creation
        foreach ($this->createModels as $cid => $createModel) {
            // Create the model
            $this->getRepository(\get_class($createModel))->create($createModel);
            // Unset the model
            unset($this->createModels[$cid]);
        }

        // Iterate through the models awaiting save
        foreach ($this->saveModels as $sid => $saveModel) {
            // Save the model
            $this->getRepository(\get_class($saveModel))->save($saveModel);
            // Unset the model
            unset($this->saveModels[$sid]);
        }

        return $this->store()->commit();
    }
Commit all items in the transaction.

@throws InvalidArgumentException
@throws InvalidEntityException

@return bool