• Post Reply Bookmark Topic Watch Topic
  • New Topic

Please explain theoretically how the Hiber. Criteria Query works for selecting records from Database

 
Vinod Vinu
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the following lines of code mean ?



Please explain me theorecticall how extaclly it is working in the background while fetching records from database through hibernate criteria query..

Thank you in advance
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Criteria crit = s.createCriteria(RegForm.class);
List list = crit.list();

The first line creates a criterion for the mapped class RegForm. The second line runs a query based on this criterion. In the background Hibernate maops from this class to a database table using a dialect and constructs the appropriate SQL to query against the database. See the documentation for more.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!