/** * 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); }
/** * 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->aServices) { $this->aServices->removeObjectServices($this); } if (null !== $this->aObject) { $this->aObject->removeObjectServices($this); } $this->id_object = null; $this->id_services = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * Filter the query by a related \Object object * * @param \Object|ObjectCollection $object 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 ChildObjectServicesQuery The current query, for fluid interface */ public function filterByObject($object, $comparison = null) { if ($object instanceof \Object) { return $this->addUsingAlias(ObjectServicesTableMap::COL_ID_OBJECT, $object->getId(), $comparison); } elseif ($object instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ObjectServicesTableMap::COL_ID_OBJECT, $object->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByObject() only accepts arguments of type \\Object or Collection'); } }
/** * Exclude object from result * * @param ChildObject $object Object to remove from the list of results * * @return $this|ChildObjectQuery The current query, for fluid interface */ public function prune($object = null) { if ($object) { $this->addUsingAlias(ObjectTableMap::COL_ID, $object->getId(), Criteria::NOT_EQUAL); } return $this; }