Hi,
you could use a LIKE expression to compare the user name:
SELECT u FROM user u WHERE u.name LIKE :name
Passing a percent sign "%" as parameter value matches a sequence of any characters which has the same effect as omitting the LIKE expression:
Query q = em.createQuery("SELECT u FROM user u WHERE u.name LIKE :name");
q.setParameter("name", "%");
List result = q.getResultList();
Regards Michael
[Message sent by forum member 'mb124283' (mb124283)]
http://forums.java.net/jive/thread.jspa?messageID=220484