Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.5.2
DB2: 8.2
Hi,
I have a question about what would be a better implementation, if any, of the one i've got now.
I have a class A which holds a collection (Set) of type class B.
My implementation is similair to:
http://forum.hibernate.org/posting.php? ... wtopic&f=1
<set name="orderLines" inverse="true">
<key>
<column name="orderId"/>
<column name="customerId"/>
</key>
<one-to-many class="OrderLine"/>
</set>
also with composite keys and an order-by clause.
What i see is that for there are 2 seperate queries being executed (both Selects) and i was wondering if there is a way make hibernate create 1 query. I need to do some research regarding the responsetimes but i want to do them on both options.
I hope someone has some suggestions or examples.
Thanks,
Maarten