source/Spiral/ORM/Record.php
public function delete(TransactionInterface $transaction = null)
    {
        if (empty($transaction)) {
            /*
             * When no transaction is given we will create our own and run it immediately.
             */
            $transaction = $transaction ?? new Transaction();
            $transaction->delete($this);
            $transaction->run();
        } else {
            $transaction->addCommand($this->queueDelete());
        }
    }
public function delete(TransactionInterface $transaction = null)
    {
        if (empty($transaction)) {
            /*
             * When no transaction is given we will create our own and run it immediately.
             */
            $transaction = $transaction ?? new Transaction();
            $transaction->delete($this);
            $transaction->run();
        } else {
            $transaction->addCommand($this->queueDelete());
        }
    }
public function delete ( TransactionInterface $ transaction = null ) { if ( empty ( $ transaction ) ) { /*
             * When no transaction is given we will create our own and run it immediately.
             */ $ transaction = $ transaction ?? new Transaction ( ) ; $ transaction -> delete ( $ this ) ; $ transaction -> run ( ) ; } else { $ transaction -> addCommand ( $ this -> queueDelete ( ) ) ; } }
Delete entity in database, when no transaction is given ActiveRecord will create and run it
automatically.

@param TransactionInterface|null $transaction
Delete entity in database when no transaction is given ActiveRecord will create and run it automatically .