Collection is a collection (surprise!) of elements: a set, a map, a bag etc.
Association is a association between entities (one-to-one, one-to-many, many-to-one, etc)
So
Order has an collection called "details", which should be accesed using something like:
Order order;
order.getDetails() ; //Set, for example
At the same time, there is an Association between Order and OrderDetails:
<class name="Order">
<set name="details"> <--------- this is the Collection
<key column="id_order">
<one-to-many class="OrderDetail"/> <-------- this is the association
</set>
_________________ andresgr (--don't forget to rate)
|