/** * 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'); } }
/** * Filter the query by a related \Menu\Model\MenuItem object * * @param \Menu\Model\MenuItem|ObjectCollection $menuItem the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMenuQuery The current query, for fluid interface */ public function filterByMenuItem($menuItem, $comparison = null) { if ($menuItem instanceof \Menu\Model\MenuItem) { return $this->addUsingAlias(MenuTableMap::ID, $menuItem->getMenuId(), $comparison); } elseif ($menuItem instanceof ObjectCollection) { return $this->useMenuItemQuery()->filterByPrimaryKeys($menuItem->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByMenuItem() only accepts arguments of type \\Menu\\Model\\MenuItem or Collection'); } }