public function save(Pment_Models_Comment $comment) { $data = array( 'cId' => $comment->getCId(), 'mtrId' => $comment->getMtrId(), 'addDate' => $comment->getAddDate(), 'comment' => $comment->getComment(), 'contactId' => $comment->getContactId() ); if (null === ($id = $comment->getCId())) { unset($data['cId']); $id = $this->getDbTable()->insert($data); return $id; } else { $this->getDbTable()->update($data, array('cId = ?' => $comment->getCId())); } }