/**
  * Exclude object from result
  *
  * @param   ChildEvent $event Object to remove from the list of results
  *
  * @return $this|ChildEventQuery The current query, for fluid interface
  */
 public function prune($event = null)
 {
     if ($event) {
         $this->addUsingAlias(EventTableMap::COL_EVENT_ID, $event->getEventId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
 /**
  * Filter the query by a related \Event object
  *
  * @param \Event|ObjectCollection $event The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildCommentQuery The current query, for fluid interface
  */
 public function filterByTarget_Event($event, $comparison = null)
 {
     if ($event instanceof \Event) {
         return $this->addUsingAlias(CommentTableMap::COL_TARGET_EVENT_ID, $event->getEventId(), $comparison);
     } elseif ($event instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(CommentTableMap::COL_TARGET_EVENT_ID, $event->toKeyValue('PrimaryKey', 'EventId'), $comparison);
     } else {
         throw new PropelException('filterByTarget_Event() only accepts arguments of type \\Event or Collection');
     }
 }
 /**
  * Validates the object and all objects related to this table.
  *
  * @see        getValidationFailures()
  * @param      object $validator A Validator class instance
  * @return     boolean Whether all objects pass validation.
  */
 public function validate(ValidatorInterface $validator = null)
 {
     if (null === $validator) {
         if (class_exists('Symfony\\Component\\Validator\\Validator\\LegacyValidator')) {
             $validator = new LegacyValidator(new ExecutionContextFactory(new DefaultTranslator()), new ClassMetaDataFactory(new StaticMethodLoader()), new ConstraintValidatorFactory());
         } else {
             $validator = new Validator(new ClassMetadataFactory(new StaticMethodLoader()), new ConstraintValidatorFactory(), new DefaultTranslator());
         }
     }
     $failureMap = new ConstraintViolationList();
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         // We call the validate method on the following object(s) if they
         // were passed to this object by their corresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         // If validate() method exists, the validate-behavior is configured for related object
         if (method_exists($this->aInterested, 'validate')) {
             if (!$this->aInterested->validate($validator)) {
                 $failureMap->addAll($this->aInterested->getValidationFailures());
             }
         }
         // If validate() method exists, the validate-behavior is configured for related object
         if (method_exists($this->aTarget_Event, 'validate')) {
             if (!$this->aTarget_Event->validate($validator)) {
                 $failureMap->addAll($this->aTarget_Event->getValidationFailures());
             }
         }
         $retval = $validator->validate($this);
         if (count($retval) > 0) {
             $failureMap->addAll($retval);
         }
         $this->alreadyInValidation = false;
     }
     $this->validationFailures = $failureMap;
     return (bool) (!(count($this->validationFailures) > 0));
 }
 /**
  * Filter the query by a related \Event object
  *
  * @param \Event|ObjectCollection $event  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildUserQuery The current query, for fluid interface
  */
 public function filterByEvent($event, $comparison = null)
 {
     if ($event instanceof \Event) {
         return $this->addUsingAlias(UserTableMap::COL_USER_ID, $event->getCreatorUserId(), $comparison);
     } elseif ($event instanceof ObjectCollection) {
         return $this->useEventQuery()->filterByPrimaryKeys($event->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByEvent() only accepts arguments of type \\Event or Collection');
     }
 }
 /**
  * @param ChildEvent $event The ChildEvent object to add.
  */
 protected function doAddEvent(ChildEvent $event)
 {
     $this->collEvents[] = $event;
     $event->setCreator($this);
 }