Quote:
will it automatically enable caching for its products association
You need to configure a separate cache for the association. I've only done this using Spring but as the Spring Javadoc points out -
http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/orm/hibernate3/LocalSessionFactoryBean.html#setCollectionCacheStrategies(java.util.Properties) - this is equivalent to the collection-cache element in the Hibernate XML Configuration File (See
http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html#configuration-xmlconfig).
Presumably you can also just specify a <cache> element in the Set configuration, per Section 19.21 in the Hibernate documentation (
http://www.hibernate.org/hib_docs/v3/reference/en/html/performance.html#performance-cache) although I haven't tried it.
Hope this helps.
John