I solved this rather easily (without adding a method) so i'll share:
use Doctrine\Common\Collections\Criteria;
$repository->matching( Criteria::create()->where( Criteria::expr()->neq('id', 1) ) );
By the way, i'm using the Doctrine ORM module from within Zend Framework 2 and i'm not sure whether this would be compatible in any other case.
In my case, i was using a form element configuration like this: to show all roles except "guest" in a radio button array.
$this->add(array(
'type' => 'DoctrineModule\Form\Element\ObjectRadio',
'name' => 'roles',
'options' => array(
'label' => _('Roles'),
'object_manager' => $this->getEntityManager(),
'target_class' => 'Application\Entity\Role',
'property' => 'roleId',
'find_method' => array(
'name' => 'matching',
'params' => array(
'criteria' => Criteria::create()->where(
Criteria::expr()->neq('roleId', 'guest')
),
),
),
),
));