Hibernate throwing a QuerySyntaxException with correct class name given
问题 I have a Product class; @Entity public class Product { . . public Product() { } . . } A generic DAO; public class GenericDao<T> { private Class<T> type; @Inject protected EntityManager entityManager; public GenericDao() { } public List<T> list() { return entityManager.createQuery("FROM " + type.getSimpleName(), type).getResultList(); } } A Product DAO class; public class ProductDao extends BaseDao<Product> { } A product JAX-RS service; @Path("/product") public class ProductService { @Inject