Monday, June 05, 2006

EJB3: Listing the Complete Contents of a Table

It took me a while to work this out. Here is is for posterity:

String queryString = "SELECT r FROM Recipe r WHERE r.id > 0";
Query myQuery = em.createQuery(queryString);
List result = myQuery.getResultList();

No comments: