src/Database/ORM/Traits/Mapping.php
/**
	 * Deletes the row from the database, returning a copy of the data from before deletion.
	 *
	 * @return array
	 */
Deletes the row from the database, returning a copy of the data from before deletion.
@return array
Deletes the row from the database returning a copy of the data from before deletion . @return array
public function delete() {
		$oldData = null;
		if (!is_null($this->getPrimaryKeyValue())) {
			$oldData = array_map(function(ModelField $field) {
				return $field->localFormat;
			}, $this->rowFieldsCommitted);
			$this->createDeleteQuery()->exec();
		}
		$this->emit('deleted');
		$this->rowFieldsCommitted = array();
		$this->rowFieldsPending = array();
		$this->rowFieldsEqualize = array();
		return $oldData;
	}
public function delete ( ) { $ oldData = null ; if ( ! is_null ( $ this -> getPrimaryKeyValue ( ) ) ) { $ oldData = array_map ( function ( ModelField $ field ) { return $ field -> localFormat ; } , $ this -> rowFieldsCommitted ) ; $ this -> createDeleteQuery ( ) -> exec ( ) ; } $ this -> emit ( 'deleted' ) ; $ this -> rowFieldsCommitted = array ( ) ; $ this -> rowFieldsPending = array ( ) ; $ this -> rowFieldsEqualize = array ( ) ; return $ oldData ; }
Deletes the row from the database, returning a copy of the data from before deletion.
Deletes the row from the database returning a copy of the data from before deletion .