src/Slashworks/BackendBundle/Model/om/BaseRoleQuery.php
public function filterByRole($role = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($role)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $role)) {
                $role = str_replace('*', '%', $role);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(RolePeer::ROLE, $role, $comparison);
    }
public function filterByRole($role = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($role)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $role)) {
                $role = str_replace('*', '%', $role);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(RolePeer::ROLE, $role, $comparison);
    }
public function filterByRole ( $ role = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ role ) ) { $ comparison = Criteria :: IN ; } elseif ( preg_match ( '/[\%\*]/' , $ role ) ) { $ role = str_replace ( '*' , '%' , $ role ) ; $ comparison = Criteria :: LIKE ; } } return $ this -> addUsingAlias ( RolePeer :: ROLE , $ role , $ comparison ) ; }
Filter the query on the role column

Example usage:
<code>
$query->filterByRole('fooValue');   // WHERE role = 'fooValue'
$query->filterByRole('%fooValue%'); // WHERE role LIKE '%fooValue%'
</code>

@param     string $role The value to use as filter.
Accepts wildcards (* and % trigger a LIKE)
@param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

@return RoleQuery The current query, for fluid interface
Filter the query on the role column