/**
  * Declares an association between this object and a ChildMenuItem object.
  *
  * @param                  ChildMenuItem $v
  * @return                 \Menu\Model\MenuItemVersion The current object (for fluent API support)
  * @throws PropelException
  */
 public function setMenuItem(ChildMenuItem $v = null)
 {
     if ($v === null) {
         $this->setId(NULL);
     } else {
         $this->setId($v->getId());
     }
     if ($v === null) {
         $this->setMenuId(NULL);
     } else {
         $this->setMenuId($v->getMenuId());
     }
     $this->aMenuItem = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildMenuItem object, it will not be re-added.
     if ($v !== null) {
         $v->addMenuItemVersion($this);
     }
     return $this;
 }
 /**
  * Exclude object from result
  *
  * @param   ChildMenuItem $menuItem Object to remove from the list of results
  *
  * @return ChildMenuItemQuery The current query, for fluid interface
  */
 public function prune($menuItem = null)
 {
     if ($menuItem) {
         $this->addCond('pruneCond0', $this->getAliasedColName(MenuItemTableMap::ID), $menuItem->getId(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(MenuItemTableMap::MENU_ID), $menuItem->getMenuId(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
     }
     return $this;
 }
 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database. In some cases you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by find*()
  * and findPk*() calls.
  *
  * @param \Menu\Model\MenuItem $obj A \Menu\Model\MenuItem object.
  * @param string $key             (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool($obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if (null === $key) {
             $key = serialize(array((string) $obj->getId(), (string) $obj->getMenuId()));
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
 /**
  * Filter the query by a related \Menu\Model\MenuItem object
  *
  * @param \Menu\Model\MenuItem $menuItem The related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildMenuItemVersionQuery The current query, for fluid interface
  */
 public function filterByMenuItem($menuItem, $comparison = null)
 {
     if ($menuItem instanceof \Menu\Model\MenuItem) {
         return $this->addUsingAlias(MenuItemVersionTableMap::ID, $menuItem->getId(), $comparison)->addUsingAlias(MenuItemVersionTableMap::MENU_ID, $menuItem->getMenuId(), $comparison);
     } else {
         throw new PropelException('filterByMenuItem() only accepts arguments of type \\Menu\\Model\\MenuItem');
     }
 }