/** * Filter the query by a related \Tekstove\ApiBundle\Model\Acl\PermissionGroupUser object * * @param \Tekstove\ApiBundle\Model\Acl\PermissionGroupUser|ObjectCollection $permissionGroupUser the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildPermissionGroupQuery The current query, for fluid interface */ public function filterByPermissionGroupUser($permissionGroupUser, $comparison = null) { if ($permissionGroupUser instanceof \Tekstove\ApiBundle\Model\Acl\PermissionGroupUser) { return $this->addUsingAlias(PermissionGroupTableMap::COL_ID, $permissionGroupUser->getGroupId(), $comparison); } elseif ($permissionGroupUser instanceof ObjectCollection) { return $this->usePermissionGroupUserQuery()->filterByPrimaryKeys($permissionGroupUser->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByPermissionGroupUser() only accepts arguments of type \\Tekstove\\ApiBundle\\Model\\Acl\\PermissionGroupUser or Collection'); } }
/** * Exclude object from result * * @param ChildPermissionGroupUser $permissionGroupUser Object to remove from the list of results * * @return $this|ChildPermissionGroupUserQuery The current query, for fluid interface */ public function prune($permissionGroupUser = null) { if ($permissionGroupUser) { $this->addCond('pruneCond0', $this->getAliasedColName(PermissionGroupUserTableMap::COL_USER_ID), $permissionGroupUser->getUserId(), Criteria::NOT_EQUAL); $this->addCond('pruneCond1', $this->getAliasedColName(PermissionGroupUserTableMap::COL_GROUP_ID), $permissionGroupUser->getGroupId(), Criteria::NOT_EQUAL); $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); } 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 \Tekstove\ApiBundle\Model\Acl\PermissionGroupUser $obj A \Tekstove\ApiBundle\Model\Acl\PermissionGroupUser 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([null === $obj->getUserId() || is_scalar($obj->getUserId()) || is_callable([$obj->getUserId(), '__toString']) ? (string) $obj->getUserId() : $obj->getUserId(), null === $obj->getGroupId() || is_scalar($obj->getGroupId()) || is_callable([$obj->getGroupId(), '__toString']) ? (string) $obj->getGroupId() : $obj->getGroupId()]); } // if key === null self::$instances[$key] = $obj; } }