SELECT « DAO « JPA Q&A





1. JPQL query SELECT optional + generic DAO select    stackoverflow.com

I have followed a working JPA example to retrieve Category objects as such:

return (ArrayList<Category>) getEntityManager().createQuery("from Category").getResultList();
The query is very shorthand - and I can't find the rules for what is optional ...