Esempio n. 1
0
 /**
  * Filter the query by a related \Tekstove\ApiBundle\Model\Lyric\LyricTranslation object
  *
  * @param \Tekstove\ApiBundle\Model\Lyric\LyricTranslation|ObjectCollection $lyricTranslation 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 filterByLyricTranslation($lyricTranslation, $comparison = null)
 {
     if ($lyricTranslation instanceof \Tekstove\ApiBundle\Model\Lyric\LyricTranslation) {
         return $this->addUsingAlias(UserTableMap::COL_ID, $lyricTranslation->getUserId(), $comparison);
     } elseif ($lyricTranslation instanceof ObjectCollection) {
         return $this->useLyricTranslationQuery()->filterByPrimaryKeys($lyricTranslation->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByLyricTranslation() only accepts arguments of type \\Tekstove\\ApiBundle\\Model\\Lyric\\LyricTranslation or Collection');
     }
 }
Esempio n. 2
0
 /**
  * @param LyricTranslation $lyricTranslation The LyricTranslation object to add.
  */
 protected function doAddLyricTranslation(LyricTranslation $lyricTranslation)
 {
     $this->collLyricTranslations[] = $lyricTranslation;
     $lyricTranslation->setUser($this);
 }
 /**
  * Exclude object from result
  *
  * @param   ChildLyricTranslation $lyricTranslation Object to remove from the list of results
  *
  * @return $this|ChildLyricTranslationQuery The current query, for fluid interface
  */
 public function prune($lyricTranslation = null)
 {
     if ($lyricTranslation) {
         $this->addUsingAlias(LyricTranslationTableMap::COL_ID, $lyricTranslation->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }