Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Hibernate] Selection Collection from table.

 
Stas Baturin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI
How to selection Collection from table without using Query query = session.createQuery(SQL_QUERY); ??
My example :

But throws Exception:

How to get a collection instead of just one object?
 
Aravind M Jay
Greenhorn
Posts: 15
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Criteria API is one of the ways -



  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic