/**
  * Declares an association between this object and a ChildPermissionGroup object.
  *
  * @param  ChildPermissionGroup $v
  * @return $this|\Tekstove\ApiBundle\Model\Acl\PermissionGroupUser The current object (for fluent API support)
  * @throws PropelException
  */
 public function setPermissionGroup(ChildPermissionGroup $v = null)
 {
     if ($v === null) {
         $this->setGroupId(NULL);
     } else {
         $this->setGroupId($v->getId());
     }
     $this->aPermissionGroup = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildPermissionGroup object, it will not be re-added.
     if ($v !== null) {
         $v->addPermissionGroupUser($this);
     }
     return $this;
 }
 /**
  * Filter the query by a related \Tekstove\ApiBundle\Model\Acl\PermissionGroup object
  *
  * @param \Tekstove\ApiBundle\Model\Acl\PermissionGroup|ObjectCollection $permissionGroup 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 ChildPermissionGroupUserQuery The current query, for fluid interface
  */
 public function filterByPermissionGroup($permissionGroup, $comparison = null)
 {
     if ($permissionGroup instanceof \Tekstove\ApiBundle\Model\Acl\PermissionGroup) {
         return $this->addUsingAlias(PermissionGroupUserTableMap::COL_GROUP_ID, $permissionGroup->getId(), $comparison);
     } elseif ($permissionGroup instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PermissionGroupUserTableMap::COL_GROUP_ID, $permissionGroup->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByPermissionGroup() only accepts arguments of type \\Tekstove\\ApiBundle\\Model\\Acl\\PermissionGroup or Collection');
     }
 }
 /**
  * Exclude object from result
  *
  * @param   ChildPermissionGroup $permissionGroup Object to remove from the list of results
  *
  * @return $this|ChildPermissionGroupQuery The current query, for fluid interface
  */
 public function prune($permissionGroup = null)
 {
     if ($permissionGroup) {
         $this->addUsingAlias(PermissionGroupTableMap::COL_ID, $permissionGroup->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }