diff --git a/controllers/CreateControllers.class.php b/controllers/CreateControllers.class.php index d5f2448..0d52332 100644 --- a/controllers/CreateControllers.class.php +++ b/controllers/CreateControllers.class.php @@ -156,7 +156,7 @@ private function addSave() $this->addLine(ESP.'{'); $this->addLine(ESP.ESP.'$result = null;'); $this->addLine(ESP.ESP.'if( $objVo->get'.$columunPK.'() ) {'); - $this->addLine(ESP.ESP.'$this->validatePkNotExist( $id );'); + $this->addLine(ESP.ESP.ESP.'$this->validatePkNotExist( $objVo->get'.$columunPK.'() );'); $this->addLine(ESP.ESP.ESP.'$result = $this->dao->update( $objVo );'); $this->addLine(ESP.ESP.'} else {'); $this->addLine(ESP.ESP.ESP.'$result = $this->dao->insert( $objVo );');