예제 #1
0
 /**
  * Filter the query by a related \Responses object
  *
  * @param \Responses|ObjectCollection $responses  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildQuestionsQuery The current query, for fluid interface
  */
 public function filterByResponses($responses, $comparison = null)
 {
     if ($responses instanceof \Responses) {
         return $this->addUsingAlias(QuestionsTableMap::COL_ID, $responses->getQuestionId(), $comparison);
     } elseif ($responses instanceof ObjectCollection) {
         return $this->useResponsesQuery()->filterByPrimaryKeys($responses->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByResponses() only accepts arguments of type \\Responses or Collection');
     }
 }
예제 #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildResponses $responses Object to remove from the list of results
  *
  * @return $this|ChildResponsesQuery The current query, for fluid interface
  */
 public function prune($responses = null)
 {
     if ($responses) {
         $this->addUsingAlias(ResponsesTableMap::COL_ID, $responses->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
예제 #3
0
 /**
  * @param ChildResponses $responses The ChildResponses object to add.
  */
 protected function doAddResponses(ChildResponses $responses)
 {
     $this->collResponsess[] = $responses;
     $responses->setQuestions($this);
 }