/** * 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->aCategory) { $this->aCategory->removeObjectCategory($this); } if (null !== $this->aObject) { $this->aObject->removeObjectCategory($this); } $this->id_object = null; $this->id_category = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * Exclude object from result * * @param ChildCategory $category Object to remove from the list of results * * @return $this|ChildCategoryQuery The current query, for fluid interface */ public function prune($category = null) { if ($category) { $this->addUsingAlias(CategoryTableMap::COL_ID, $category->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \Category object * * @param \Category|ObjectCollection $category 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 ChildObjectCategoryQuery The current query, for fluid interface */ public function filterByCategory($category, $comparison = null) { if ($category instanceof \Category) { return $this->addUsingAlias(ObjectCategoryTableMap::COL_ID_CATEGORY, $category->getId(), $comparison); } elseif ($category instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ObjectCategoryTableMap::COL_ID_CATEGORY, $category->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByCategory() only accepts arguments of type \\Category or Collection'); } }
/** * 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->aCategory) { $this->aCategory->removeCategoryOption($this); } if (null !== $this->aCategoryOptionRelatedByParentId) { $this->aCategoryOptionRelatedByParentId->removeCategoryOptionRelatedById($this); } $this->id = null; $this->category_id = null; $this->description = null; $this->comment = null; $this->mod_comment = null; $this->value = null; $this->sequence = null; $this->parent_id = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }