src/Slashworks/BackendBundle/Model/om/BaseUserRoleQuery.php
public function filterByRole($role, $comparison = null)
    {
        if ($role instanceof Role) {
            return $this
                ->addUsingAlias(UserRolePeer::ROLE_ID, $role->getId(), $comparison);
        } elseif ($role instanceof PropelObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(UserRolePeer::ROLE_ID, $role->toKeyValue('PrimaryKey', 'Id'), $comparison);
        } else {
            throw new PropelException('filterByRole() only accepts arguments of type Role or PropelCollection');
        }
    }
public function filterByRole($role, $comparison = null)
    {
        if ($role instanceof Role) {
            return $this
                ->addUsingAlias(UserRolePeer::ROLE_ID, $role->getId(), $comparison);
        } elseif ($role instanceof PropelObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(UserRolePeer::ROLE_ID, $role->toKeyValue('PrimaryKey', 'Id'), $comparison);
        } else {
            throw new PropelException('filterByRole() only accepts arguments of type Role or PropelCollection');
        }
    }
public function filterByRole ( $ role , $ comparison = null ) { if ( $ role instanceof Role ) { return $ this -> addUsingAlias ( UserRolePeer :: ROLE_ID , $ role -> getId ( ) , $ comparison ) ; } elseif ( $ role instanceof PropelObjectCollection ) { if ( null === $ comparison ) { $ comparison = Criteria :: IN ; } return $ this -> addUsingAlias ( UserRolePeer :: ROLE_ID , $ role -> toKeyValue ( 'PrimaryKey' , 'Id' ) , $ comparison ) ; } else { throw new PropelException ( 'filterByRole() only accepts arguments of type Role or PropelCollection' ) ; } }
Filter the query by a related Role object

@param   Role|PropelObjectCollection $role The related object(s) to use as filter
@param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

@return                 UserRoleQuery The current query, for fluid interface
@throws PropelException - if the provided filter is invalid.
Filter the query by a related Role object