Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Object Relational Mapping and the fly likes [Hibernate] Selection Collection from table. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "[Hibernate] Selection Collection from table." Watch "[Hibernate] Selection Collection from table." New topic
Author

[Hibernate] Selection Collection from table.

Stas Baturin
Greenhorn

Joined: Dec 21, 2011
Posts: 5
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

Joined: Mar 16, 2006
Posts: 15
Criteria API is one of the ways -



 
wood burning stoves
 
subject: [Hibernate] Selection Collection from table.
 
Similar Threads
Select all row values using JPA
copy data from one table on server1 to another table of server2
Can you update two independent tables with one fireTableChanged from DB Query
What Is the Correct Syntax?
setting runtime selection criteria in a jsp for crystal reports11 using jrc