the java persistance with hibernate book states:
Quote:
"Every time I need an Item, I also need the
seller of that Item.”
If you can make that statement, you should go into your
mapping metadata, enable eager fetching for the seller association, and utilize SQL joins:
Code:
<class name="Item" table="ITEM">
...
<many-to-one name="seller"
class="User"
column="SELLER_ID"
update="false"
fetch="join"/>
</class>
do i need to
"enable eager fetching" or does setting fetch="join" implicitly
enable eager fetching?
but i still don't know if only one collection per class is allowed to have fetch="join" ? i read that is does in Hibernate Quickly by Peak Heudecker, but that book is a couple years old so....