Skip to content

Commit

Permalink
🐛 #118 correção validar pk not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Sep 28, 2022
1 parent 5deb41d commit d477985
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/CreateControllers.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private function addValidatePkNotExist()
$this->addLine(ESP.'{');
$this->addLine(ESP.ESP.'$where=array(\''.$columunPK.'\'=>$id);');
$this->addLine(ESP.ESP.'$qtd = $this->selectCount($where);');
$this->addLine(ESP.ESP.'if($qtd >= 1){');
$this->addLine(ESP.ESP.'if( empty($qtd) ){');
$this->addLine(ESP.ESP.ESP.'throw new DomainException(Message::GENERIC_ID_NOT_EXIST);');
$this->addLine(ESP.ESP.'}');
$this->addLine(ESP.'}');
Expand Down

0 comments on commit d477985

Please sign in to comment.