Example #1
0
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         if ($this->aProvincia !== null) {
             if (!$this->aProvincia->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aProvincia->getValidationFailures());
             }
         }
         if ($this->aTipodocumento !== null) {
             if (!$this->aTipodocumento->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aTipodocumento->getValidationFailures());
             }
         }
         if ($this->aCuenta !== null) {
             if (!$this->aCuenta->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aCuenta->getValidationFailures());
             }
         }
         if ($this->aRolResponsable !== null) {
             if (!$this->aRolResponsable->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aRolResponsable->getValidationFailures());
             }
         }
         if ($this->aNivelInstruccion !== null) {
             if (!$this->aNivelInstruccion->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aNivelInstruccion->getValidationFailures());
             }
         }
         if (($retval = ResponsablePeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collRelRolresponsableResponsables !== null) {
             foreach ($this->collRelRolresponsableResponsables as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }