Example #1
0
 /**
  * Filter the query by a related \Tekstove\ApiBundle\Model\Lyric object
  *
  * @param \Tekstove\ApiBundle\Model\Lyric|ObjectCollection $lyric 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 filterByLyric($lyric, $comparison = null)
 {
     if ($lyric instanceof \Tekstove\ApiBundle\Model\Lyric) {
         return $this->addUsingAlias(UserTableMap::COL_ID, $lyric->getsendBy(), $comparison);
     } elseif ($lyric instanceof ObjectCollection) {
         return $this->useLyricQuery()->filterByPrimaryKeys($lyric->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByLyric() only accepts arguments of type \\Tekstove\\ApiBundle\\Model\\Lyric or Collection');
     }
 }