/** * @param ChildSubcategories $subcategories The ChildSubcategories object to add. */ protected function doAddSubcategories(ChildSubcategories $subcategories) { $this->collSubcategoriess[] = $subcategories; $subcategories->setCategories($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->aCategories) { $this->aCategories->removeItems($this); } if (null !== $this->aSubcategories) { $this->aSubcategories->removeItems($this); } if (null !== $this->aUser) { $this->aUser->removeItems($this); } $this->item_id = null; $this->category_id = null; $this->user_id = null; $this->item_name = null; $this->price = null; $this->description = null; $this->date_added = null; $this->date_sold = null; $this->subcategory_id = null; $this->image_url = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->applyDefaultValues(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * Filter the query by a related \Subcategories object * * @param \Subcategories|ObjectCollection $subcategories 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 ChildItemsQuery The current query, for fluid interface */ public function filterBySubcategories($subcategories, $comparison = null) { if ($subcategories instanceof \Subcategories) { return $this->addUsingAlias(ItemsTableMap::COL_SUBCATEGORY_ID, $subcategories->getSubcategoryId(), $comparison); } elseif ($subcategories instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ItemsTableMap::COL_SUBCATEGORY_ID, $subcategories->toKeyValue('PrimaryKey', 'SubcategoryId'), $comparison); } else { throw new PropelException('filterBySubcategories() only accepts arguments of type \\Subcategories or Collection'); } }
/** * Filter the query by a related \Subcategories object * * @param \Subcategories|ObjectCollection $subcategories the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoriesQuery The current query, for fluid interface */ public function filterBySubcategories($subcategories, $comparison = null) { if ($subcategories instanceof \Subcategories) { return $this->addUsingAlias(CategoriesTableMap::COL_CATEGORY_ID, $subcategories->getCategoryId(), $comparison); } elseif ($subcategories instanceof ObjectCollection) { return $this->useSubcategoriesQuery()->filterByPrimaryKeys($subcategories->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterBySubcategories() only accepts arguments of type \\Subcategories or Collection'); } }
/** * Exclude object from result * * @param ChildSubcategories $subcategories Object to remove from the list of results * * @return $this|ChildSubcategoriesQuery The current query, for fluid interface */ public function prune($subcategories = null) { if ($subcategories) { $this->addUsingAlias(SubcategoriesTableMap::COL_SUBCATEGORY_ID, $subcategories->getSubcategoryId(), Criteria::NOT_EQUAL); } return $this; }