Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Ordering when lazy fetching in JPA

Mani Rai
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys,

I am using JPA implemented by Hibernate and I have been wondering if there's any provision of ordering list when lazy loading the child objects. For example:

class Order {

List<Items> itemList;


The above order class have one to many relation with item class. When I fetch order, I can also fetch list of items lazily. But I was wondering about provision of some annotations/attributes by hibernate so that item list will be listed in ascending/descending order.
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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!