コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
ファイル: Canon.php プロジェクト: sam-higton/spoiler-wiki
 /**
  * Declares an association between this object and a ChildArtist object.
  *
  * @param  ChildArtist $v
  * @return $this|\SpoilerWiki\Canon The current object (for fluent API support)
  * @throws PropelException
  */
 public function setprimaryArtist(ChildArtist $v = null)
 {
     if ($v === null) {
         $this->setPrimaryArtistId(NULL);
     } else {
         $this->setPrimaryArtistId($v->getId());
     }
     $this->aprimaryArtist = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildArtist object, it will not be re-added.
     if ($v !== null) {
         $v->addCanon($this);
     }
     return $this;
 }
コード例 #3
0
ファイル: WorkQuery.php プロジェクト: sam-higton/spoiler-wiki
 /**
  * Filter the query by a related \SpoilerWiki\Artist object
  *
  * @param \SpoilerWiki\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 ChildWorkQuery The current query, for fluid interface
  */
 public function filterByprimaryArtist($artist, $comparison = null)
 {
     if ($artist instanceof \SpoilerWiki\Artist) {
         return $this->addUsingAlias(WorkTableMap::COL_PRIMARY_ARTIST_ID, $artist->getId(), $comparison);
     } elseif ($artist instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(WorkTableMap::COL_PRIMARY_ARTIST_ID, $artist->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByprimaryArtist() only accepts arguments of type \\SpoilerWiki\\Artist or Collection');
     }
 }