/** * Filter the query by a related \Tekstove\ApiBundle\Model\Artist object * * @param \Tekstove\ApiBundle\Model\Artist|ObjectCollection $artist 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 ChildArtistLyricQuery The current query, for fluid interface */ public function filterByArtist($artist, $comparison = null) { if ($artist instanceof \Tekstove\ApiBundle\Model\Artist) { return $this->addUsingAlias(ArtistLyricTableMap::COL_ARTIST_ID, $artist->getId(), $comparison); } elseif ($artist instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ArtistLyricTableMap::COL_ARTIST_ID, $artist->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByArtist() only accepts arguments of type \\Tekstove\\ApiBundle\\Model\\Artist or Collection'); } }
/** * Declares an association between this object and a Artist object. * * @param Artist $v * @return $this|\Tekstove\ApiBundle\Model\Artist\ArtistLyric The current object (for fluent API support) * @throws PropelException */ public function setArtist(Artist $v = null) { if ($v === null) { $this->setArtistId(NULL); } else { $this->setArtistId($v->getId()); } $this->aArtist = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the Artist object, it will not be re-added. if ($v !== null) { $v->addArtistLyric($this); } return $this; }
/** * Exclude object from result * * @param ChildArtist $artist Object to remove from the list of results * * @return $this|ChildArtistQuery The current query, for fluid interface */ public function prune($artist = null) { if ($artist) { $this->addUsingAlias(ArtistTableMap::COL_ID, $artist->getId(), Criteria::NOT_EQUAL); } return $this; }