Persistent collections are a feature!

See Persistent collections are a feature! on Hibernate team member blog.

Exceptions when it’s useful to map collection:

  • objects in collection are owned by the parent
  • you need merge feature for collection (see Session#merge())
  • you can (have to) map the collection with lazy=”false”

If those three conditions are met all at once then I will recomend to map that collection.

Leave a Reply

Your email address will not be published. Required fields are marked *