HQL, Collections & Query Cache - LazyInitianlizationException
I am trying to get caching working with a query that has left join fetch
(on lazy associations) but I'm getting a LazyInitianlizationException when
I enable caching on the query.
I tried using Hibernate.initialize() on the collections in the DAO with no
success.
Both entities and collections have the cache annotations.
Shouldn't hibernate use 2nd level cache to load the entities for the
collection ids in the query cache?
PS I do not want to use OpenSessionInView filter.
No comments:
Post a Comment