Quote:
My question is why does the second level cache not work with collections that have filters applied ?
Because the 2L cache cannot know, if the cached collection is still valid or obsolete without executing the filter-query again.
You must consider that between a put into 2L cache and a later lookup into 2L cache, someone other in meantime could
have commited changes on associated entities in way that the filter would return another resultset as the cached.
As a serious 2Lcache implementation never has to return obsolete data, I assume that Hiberante simply deactivates
2L-cache on the collection if there is a filter applied.