hql « DAO « JPA Q&A





1. Restricting hibernate's eager fetch beyond DAO    stackoverflow.com

I have my entities as ProductType,Product and ProductInventory. I have a join query to fetch list of inventory for a specific date range which joins Product and ProductInventory. I've got list of ...

2. getSingleResult() alters the count() Query    stackoverflow.com

My application uses Hibernate to connect to SQL Server. I recently changed my DAO function that retrieves the count from one of the tables from "return query.getResultList().get(0)" to "query.getSingleResult()". The sql ...