/**
  * Filter the query by a related \Menu\Model\MenuItemVersion object
  *
  * @param \Menu\Model\MenuItemVersion|ObjectCollection $menuItemVersion  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildMenuItemQuery The current query, for fluid interface
  */
 public function filterByMenuItemVersion($menuItemVersion, $comparison = null)
 {
     if ($menuItemVersion instanceof \Menu\Model\MenuItemVersion) {
         return $this->addUsingAlias(MenuItemTableMap::ID, $menuItemVersion->getId(), $comparison)->addUsingAlias(MenuItemTableMap::MENU_ID, $menuItemVersion->getMenuId(), $comparison);
     } else {
         throw new PropelException('filterByMenuItemVersion() only accepts arguments of type \\Menu\\Model\\MenuItemVersion');
     }
 }
 /**
  * Sets the properties of the current object to the value they had at a specific version
  *
  * @param ChildMenuItemVersion $version The version object to use
  * @param ConnectionInterface   $con the connection to use
  * @param array                 $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects.
  *
  * @return ChildMenuItem The current object (for fluent API support)
  */
 public function populateFromVersion($version, $con = null, &$loadedObjects = array())
 {
     $loadedObjects['ChildMenuItem'][$version->getId()][$version->getVersion()] = $this;
     $this->setId($version->getId());
     $this->setMenuId($version->getMenuId());
     $this->setVisible($version->getVisible());
     $this->setPosition($version->getPosition());
     $this->setTypobj($version->getTypobj());
     $this->setObjet($version->getObjet());
     $this->setCreatedAt($version->getCreatedAt());
     $this->setUpdatedAt($version->getUpdatedAt());
     $this->setVersion($version->getVersion());
     $this->setVersionCreatedAt($version->getVersionCreatedAt());
     $this->setVersionCreatedBy($version->getVersionCreatedBy());
     if ($fkValue = $version->getMenuId()) {
         if (isset($loadedObjects['ChildMenu']) && isset($loadedObjects['ChildMenu'][$fkValue]) && isset($loadedObjects['ChildMenu'][$fkValue][$version->getMenuIdVersion()])) {
             $related = $loadedObjects['ChildMenu'][$fkValue][$version->getMenuIdVersion()];
         } else {
             $related = new ChildMenu();
             $relatedVersion = ChildMenuVersionQuery::create()->filterById($fkValue)->filterByVersion($version->getMenuIdVersion())->findOne($con);
             $related->populateFromVersion($relatedVersion, $con, $loadedObjects);
             $related->setNew(false);
         }
         $this->setMenu($related);
     }
     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\MenuItemVersion $obj A \Menu\Model\MenuItemVersion 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(), (string) $obj->getVersion()));
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
 /**
  * Exclude object from result
  *
  * @param   ChildMenuItemVersion $menuItemVersion Object to remove from the list of results
  *
  * @return ChildMenuItemVersionQuery The current query, for fluid interface
  */
 public function prune($menuItemVersion = null)
 {
     if ($menuItemVersion) {
         $this->addCond('pruneCond0', $this->getAliasedColName(MenuItemVersionTableMap::ID), $menuItemVersion->getId(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(MenuItemVersionTableMap::MENU_ID), $menuItemVersion->getMenuId(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond2', $this->getAliasedColName(MenuItemVersionTableMap::VERSION), $menuItemVersion->getVersion(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1', 'pruneCond2'), Criteria::LOGICAL_OR);
     }
     return $this;
 }