Exemplo n.º 1
0
 /**
  * Filter the query by a related \Thelia\Model\MessageVersion object
  *
  * @param \Thelia\Model\MessageVersion|ObjectCollection $messageVersion  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildMessageQuery The current query, for fluid interface
  */
 public function filterByMessageVersion($messageVersion, $comparison = null)
 {
     if ($messageVersion instanceof \Thelia\Model\MessageVersion) {
         return $this->addUsingAlias(MessageTableMap::ID, $messageVersion->getId(), $comparison);
     } elseif ($messageVersion instanceof ObjectCollection) {
         return $this->useMessageVersionQuery()->filterByPrimaryKeys($messageVersion->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByMessageVersion() only accepts arguments of type \\Thelia\\Model\\MessageVersion or Collection');
     }
 }