public function delete()
{
$object = $this->model->object;
$objectId = $object->getId();
$dataTable = $this->getDataTableName();
$groupsTable = $this->getGroupsTableName();
$condition = $this->db->quoteInto("o_id = ?", $objectId);
// remove relations
$this->db->delete($dataTable, $condition);
$this->db->delete($groupsTable, $condition);
}