How to use second level cache for lazy loaded collections in Hibernate?
- by Chandru
Let's say I have two entities, Employee and Skill. Every employee has a set of skills. Now when I load the skills lazily through the Employee instances the cache is not used for skills in different instances of Employee.
Let's Consider the following data set.
Employee - 1 : Java, PHP
Employee - 2 : Java, PHP
When I load Employee - 2 after…