I'm using EHCache, and have trouble to get associations cached.
#1
Given a simple schema
EntityA (1...0,*) ->EntityB
I did "from EntityA ea left join fetch ea.entityB where ea.id=10", and in my junit test, call session.clear(), then reload the EntityA with same id(10), trying to getEntityBs(), it always goes to db to do the retrieval.
I've set the <cache...> tag in both class mapping files,as well as the collection association.
Did I miss anything, or Hibernate simply doesn't support the second level association cache ?
Thanks,
-Woody
|