findAll() method is giving the empty result set in Hibernate
In hibernate I used findById() and findAll() in Dao layer.findById() method working as I expected, but findAll() always returns empty result set,I still couldn't figure out the reason, any one could help me to solve this issue, Note: There is no exception, returns only empty list Here is my code Find All method public List<T> findAll() { Query query = getSession().createQuery("SELECT obj FROM " + persistentClass.getSimpleName() + " obj"); return query.list() } Find by Id method public T findById(Long id) { T result = (T) getSession().get(getPersistentClass(), id); return result; } getSession m
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.