/** * 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->aworkType) { $this->aworkType->removeCanon($this); } if (null !== $this->aprimaryArtist) { $this->aprimaryArtist->removeCanon($this); } $this->id = null; $this->name = null; $this->description = null; $this->primary_artist_id = null; $this->work_type_id = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * 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->aprimaryArtist) { $this->aprimaryArtist->removeWork($this); } if (null !== $this->acanon) { $this->acanon->removeWork($this); } $this->id = null; $this->name = null; $this->description = null; $this->primary_artist_id = null; $this->canon_id = null; $this->sortable_rank = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * 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; }
/** * 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'); } }