示例#1
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aLyric) {
         $this->aLyric->removeArtistLyric($this);
     }
     if (null !== $this->aArtist) {
         $this->aArtist->removeArtistLyric($this);
     }
     $this->lyric_id = null;
     $this->artist_id = null;
     $this->order = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
示例#2
0
 /**
  * @param ChildArtist $artist The ChildArtist object to add.
  */
 protected function doAddArtist(ChildArtist $artist)
 {
     $this->collArtists[] = $artist;
     $artist->setUser($this);
 }
示例#3
0
 /**
  * Filter the query by a related \Tekstove\ApiBundle\Model\Artist object
  *
  * @param \Tekstove\ApiBundle\Model\Artist|ObjectCollection $artist 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 filterByArtist($artist, $comparison = null)
 {
     if ($artist instanceof \Tekstove\ApiBundle\Model\Artist) {
         return $this->addUsingAlias(UserTableMap::COL_ID, $artist->getUserId(), $comparison);
     } elseif ($artist instanceof ObjectCollection) {
         return $this->useArtistQuery()->filterByPrimaryKeys($artist->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByArtist() only accepts arguments of type \\Tekstove\\ApiBundle\\Model\\Artist or Collection');
     }
 }
 /**
  * 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');
     }
 }
示例#5
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;
 }