/** * Filter the query by a related \Models\Group object * * @param \Models\Group|ObjectCollection $group 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 ChildUserGroupQuery The current query, for fluid interface */ public function filterByGroup($group, $comparison = null) { if ($group instanceof \Models\Group) { return $this->addUsingAlias(UserGroupTableMap::COL_GROUP_ID, $group->getId(), $comparison); } elseif ($group instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(UserGroupTableMap::COL_GROUP_ID, $group->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByGroup() only accepts arguments of type \\Models\\Group or Collection'); } }
/** * Exclude object from result * * @param ChildGroup $group Object to remove from the list of results * * @return $this|ChildGroupQuery The current query, for fluid interface */ public function prune($group = null) { if ($group) { $this->addUsingAlias(GroupTableMap::COL_ID, $group->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a ChildGroup object. * * @param ChildGroup $v * @return $this|\Models\PackPermission The current object (for fluent API support) * @throws PropelException */ public function setGroup(ChildGroup $v = null) { if ($v === null) { $this->setGroupId(NULL); } else { $this->setGroupId($v->getId()); } $this->aGroup = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildGroup object, it will not be re-added. if ($v !== null) { $v->addPackPermission($this); } return $this; }
/** * Filter the query by a related \Models\Group object * * @param \Models\Group $group The related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @throws \Propel\Runtime\Exception\PropelException * * @return ChildSharedQuery The current query, for fluid interface */ public function filterByGroup($group, $comparison = null) { if ($group instanceof \Models\Group) { return $this->addUsingAlias(SharedTableMap::COL_TO_TYPE, 'group', $comparison)->addUsingAlias(SharedTableMap::COL_TO_ID, $group->getId(), $comparison); } else { throw new PropelException('filterByGroup() only accepts arguments of type \\Models\\Group'); } }