Example #1
0
 /**
  * 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->aWishlist) {
         $this->aWishlist->removeWishlistProduct($this);
     }
     if (null !== $this->aProduct) {
         $this->aProduct->removeWishlistProduct($this);
     }
     $this->wishlist_product_id = null;
     $this->wishlist_id = null;
     $this->product_id = null;
     $this->wishlist_product_comment = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Example #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildWishlist $wishlist Object to remove from the list of results
  *
  * @return $this|ChildWishlistQuery The current query, for fluid interface
  */
 public function prune($wishlist = null)
 {
     if ($wishlist) {
         $this->addUsingAlias(WishlistTableMap::COL_WISHLIST_ID, $wishlist->getWishlistId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
 /**
  * Filter the query by a related \App\Propel\Wishlist object
  *
  * @param \App\Propel\Wishlist|ObjectCollection $wishlist 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 ChildWishlistProductQuery The current query, for fluid interface
  */
 public function filterByWishlist($wishlist, $comparison = null)
 {
     if ($wishlist instanceof \App\Propel\Wishlist) {
         return $this->addUsingAlias(WishlistProductTableMap::COL_WISHLIST_ID, $wishlist->getWishlistId(), $comparison);
     } elseif ($wishlist instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(WishlistProductTableMap::COL_WISHLIST_ID, $wishlist->toKeyValue('PrimaryKey', 'WishlistId'), $comparison);
     } else {
         throw new PropelException('filterByWishlist() only accepts arguments of type \\App\\Propel\\Wishlist or Collection');
     }
 }
Example #4
0
 /**
  * @param ChildWishlist $wishlist The ChildWishlist object to add.
  */
 protected function doAddWishlist(ChildWishlist $wishlist)
 {
     $this->collWishlists[] = $wishlist;
     $wishlist->setUser($this);
 }
Example #5
0
 /**
  * Filter the query by a related \App\Propel\Wishlist object
  *
  * @param \App\Propel\Wishlist|ObjectCollection $wishlist the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildUserQuery The current query, for fluid interface
  */
 public function filterByWishlist($wishlist, $comparison = null)
 {
     if ($wishlist instanceof \App\Propel\Wishlist) {
         return $this->addUsingAlias(UserTableMap::COL_USER_ID, $wishlist->getUserId(), $comparison);
     } elseif ($wishlist instanceof ObjectCollection) {
         return $this->useWishlistQuery()->filterByPrimaryKeys($wishlist->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByWishlist() only accepts arguments of type \\App\\Propel\\Wishlist or Collection');
     }
 }