getEntityManager()->createQueryBuilder() ->update('WallabagCoreBundle:Notification', 'n') ->set('n.read', true) ->where('n.user = :userId')->setParameter('userId', $userId) ->getQuery() ->getResult(); } }