/** * Deletes a managed entity. * * The entity to delete must be managed and have a persistent identifier. * The deletion happens instantaneously. * * Subclasses may override this method to customize the semantics of entity deletion. * * @param object $entity The entity to delete. */ public function delete($entity) { $identifier = $this->_em->getUnitOfWork()->getEntityIdentifier($entity); $this->deleteJoinTableRecords($identifier); $id = array_combine($this->_class->getIdentifierColumnNames(), $identifier); $this->_conn->delete($this->_class->table['name'], $id); }
/** * Deletes this entry in the table * @return $this */ public function delete() { reset($this->__fields); $pk = key($this->__fields); $this->__db->delete($this->getTableName(), array($pk => $this->__get($pk))); return $this; }
/** * Deletes an entity. * * @param object $entity The entity to delete. */ public function delete($entity) { $id = array_combine($this->_class->getIdentifierFieldNames(), $this->_em->getUnitOfWork()->getEntityIdentifier($entity)); $this->_conn->delete($this->_class->primaryTable['name'], $id); }
public function delete($id) { return $this->db->delete('zadania', array('id' => $id)); }