protected function doValidate($columns = null) { if (!$this->alreadyInValidation) { $this->alreadyInValidation = true; $retval = null; $failureMap = array(); if ($this->aUser !== null) { if (!$this->aUser->validate($columns)) { $failureMap = array_merge($failureMap, $this->aUser->getValidationFailures()); } } if (($retval = QuestionPeer::doValidate($this, $columns)) !== true) { $failureMap = array_merge($failureMap, $retval); } if ($this->collAnswers !== null) { foreach ($this->collAnswers as $referrerFK) { if (!$referrerFK->validate($columns)) { $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); } } } if ($this->collInterests !== null) { foreach ($this->collInterests as $referrerFK) { if (!$referrerFK->validate($columns)) { $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); } } } $this->alreadyInValidation = false; } return !empty($failureMap) ? $failureMap : true; }