Joined: Tue Mar 27, 2007 10:55 pm Posts: 2279 Location: Earth Has thanked: 39 time Have thanks: 61 time
Following code use EJB QL to select a group a topics by list of dates .
Using the entity manager
Code:
List<Topic> results = entitymanager.createQuery( "select t from Topic t where t.creationDate in (:datesList)") .setParameter("datesList", datesList) .getResultList();
You can put this query in orm.xml as named query :