org.hibernate Code Samples
- How do I create Hibernate's SessionFactory?
- How do I limit the Hibernate query result?
- How do I use Hibernate's Restriction.in criterion?
- How do I retrieve a list of Hibernate's persistent objects?
- How do I delete persistent object in Hibernate?
- How do I retrieve object from database in Hibernate?
- How do I store object in Hibernate?
- How do I set the fetch mode for Criteria association?
- How do I use min, max, avg and sum Projections?
- How do I add Restrictions to the Criteria object?
- How do I create a pagination using Criteria?
- How do I count the total records using Projections?
- How do I select a single record using Criteria?
- How do I order the Criteria query resultset?
Page 1 of 2 |
Prev
|
Next
How do I set the fetch mode for Criteria association?
To set the fetching mode for association we can call the Criteria's setFetchMode() method. We can user the FetchMode.SELECT or FetchMode.JOIN.