/** * Filter the query by a related \ORM\RolePermission object * * @param \ORM\RolePermission|ObjectCollection $rolePermission the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRoleQuery The current query, for fluid interface */ public function filterByPermission($rolePermission, $comparison = null) { if ($rolePermission instanceof \ORM\RolePermission) { return $this->addUsingAlias(RoleTableMap::COL_ID, $rolePermission->getId(), $comparison); } elseif ($rolePermission instanceof ObjectCollection) { return $this->usePermissionQuery()->filterByPrimaryKeys($rolePermission->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByPermission() only accepts arguments of type \\ORM\\RolePermission or Collection'); } }
/** * Exclude object from result * * @param ChildRolePermission $rolePermission Object to remove from the list of results * * @return $this|ChildRolePermissionQuery The current query, for fluid interface */ public function prune($rolePermission = null) { if ($rolePermission) { $this->addUsingAlias(RolePermissionTableMap::COL_ID, $rolePermission->getId(), Criteria::NOT_EQUAL); } return $this; }