/** * Exclude object from result * * @param ChildWorkType $workType Object to remove from the list of results * * @return $this|ChildWorkTypeQuery The current query, for fluid interface */ public function prune($workType = null) { if ($workType) { $this->addUsingAlias(WorkTypeTableMap::COL_ID, $workType->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * 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); }
/** * Filter the query by a related \SpoilerWiki\WorkType object * * @param \SpoilerWiki\WorkType|ObjectCollection $workType 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 ChildCanonQuery The current query, for fluid interface */ public function filterByworkType($workType, $comparison = null) { if ($workType instanceof \SpoilerWiki\WorkType) { return $this->addUsingAlias(CanonTableMap::COL_WORK_TYPE_ID, $workType->getId(), $comparison); } elseif ($workType instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(CanonTableMap::COL_WORK_TYPE_ID, $workType->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByworkType() only accepts arguments of type \\SpoilerWiki\\WorkType or Collection'); } }