/** * Exclude object from result * * @param ChildArtistLyric $artistLyric Object to remove from the list of results * * @return $this|ChildArtistLyricQuery The current query, for fluid interface */ public function prune($artistLyric = null) { if ($artistLyric) { $this->addCond('pruneCond0', $this->getAliasedColName(ArtistLyricTableMap::COL_LYRIC_ID), $artistLyric->getLyricId(), Criteria::NOT_EQUAL); $this->addCond('pruneCond1', $this->getAliasedColName(ArtistLyricTableMap::COL_ARTIST_ID), $artistLyric->getArtistId(), Criteria::NOT_EQUAL); $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); } return $this; }
/** * Adds an object to the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases you may need to explicitly add objects * to the cache in order to ensure that the same objects are always returned by find*() * and findPk*() calls. * * @param \Tekstove\ApiBundle\Model\Artist\ArtistLyric $obj A \Tekstove\ApiBundle\Model\Artist\ArtistLyric object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if (null === $key) { $key = serialize([null === $obj->getLyricId() || is_scalar($obj->getLyricId()) || is_callable([$obj->getLyricId(), '__toString']) ? (string) $obj->getLyricId() : $obj->getLyricId(), null === $obj->getArtistId() || is_scalar($obj->getArtistId()) || is_callable([$obj->getArtistId(), '__toString']) ? (string) $obj->getArtistId() : $obj->getArtistId()]); } // if key === null self::$instances[$key] = $obj; } }
/** * Filter the query by a related \Tekstove\ApiBundle\Model\Artist\ArtistLyric object * * @param \Tekstove\ApiBundle\Model\Artist\ArtistLyric|ObjectCollection $artistLyric the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildArtistQuery The current query, for fluid interface */ public function filterByArtistLyric($artistLyric, $comparison = null) { if ($artistLyric instanceof \Tekstove\ApiBundle\Model\Artist\ArtistLyric) { return $this->addUsingAlias(ArtistTableMap::COL_ID, $artistLyric->getArtistId(), $comparison); } elseif ($artistLyric instanceof ObjectCollection) { return $this->useArtistLyricQuery()->filterByPrimaryKeys($artistLyric->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByArtistLyric() only accepts arguments of type \\Tekstove\\ApiBundle\\Model\\Artist\\ArtistLyric or Collection'); } }