protected function doValidate($columns = null) { if (!$this->alreadyInValidation) { $this->alreadyInValidation = true; $retval = null; $failureMap = array(); if ($this->aSchedule !== null) { if (!$this->aSchedule->validate($columns)) { $failureMap = array_merge($failureMap, $this->aSchedule->getValidationFailures()); } } if ($this->aLocation !== null) { if (!$this->aLocation->validate($columns)) { $failureMap = array_merge($failureMap, $this->aLocation->getValidationFailures()); } } if ($this->aClassSession !== null) { if (!$this->aClassSession->validate($columns)) { $failureMap = array_merge($failureMap, $this->aClassSession->getValidationFailures()); } } if (($retval = ScheduleDetailPeer::doValidate($this, $columns)) !== true) { $failureMap = array_merge($failureMap, $retval); } if ($this->collStudentCourses !== null) { foreach ($this->collStudentCourses as $referrerFK) { if (!$referrerFK->validate($columns)) { $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); } } } $this->alreadyInValidation = false; } return !empty($failureMap) ? $failureMap : true; }