/** * Declares an association between this object and a ChildUserAccessType object. * * @param ChildUserAccessType $v * @return $this|\UserAccess The current object (for fluent API support) * @throws PropelException */ public function setUserAccessType(ChildUserAccessType $v = null) { if ($v === null) { $this->setUserAccessTypeId(NULL); } else { $this->setUserAccessTypeId($v->getId()); } $this->aUserAccessType = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildUserAccessType object, it will not be re-added. if ($v !== null) { $v->addUserAccess($this); } return $this; }
/** * Exclude object from result * * @param ChildUserAccessType $userAccessType Object to remove from the list of results * * @return $this|ChildUserAccessTypeQuery The current query, for fluid interface */ public function prune($userAccessType = null) { if ($userAccessType) { $this->addUsingAlias(UserAccessTypeTableMap::COL_ID, $userAccessType->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \UserAccessType object * * @param \UserAccessType|ObjectCollection $userAccessType 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 ChildUserAccessQuery The current query, for fluid interface */ public function filterByUserAccessType($userAccessType, $comparison = null) { if ($userAccessType instanceof \UserAccessType) { return $this->addUsingAlias(UserAccessTableMap::COL_USER_ACCESS_TYPE_ID, $userAccessType->getId(), $comparison); } elseif ($userAccessType instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(UserAccessTableMap::COL_USER_ACCESS_TYPE_ID, $userAccessType->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByUserAccessType() only accepts arguments of type \\UserAccessType or Collection'); } }