Exemplo n.º 1
0
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         if ($this->aRegionRelatedByParent !== null) {
             if (!$this->aRegionRelatedByParent->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aRegionRelatedByParent->getValidationFailures());
             }
         }
         if (($retval = RegionPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collStudentDetails !== null) {
             foreach ($this->collStudentDetails as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collTestApplicantDetails !== null) {
             foreach ($this->collTestApplicantDetails as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collStudentParentssRelatedByPob !== null) {
             foreach ($this->collStudentParentssRelatedByPob as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collStudentParentssRelatedByRegionId !== null) {
             foreach ($this->collStudentParentssRelatedByRegionId as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }