Bug reports should generally be accompanied by a test case!
See last comment on
. Approach and fix were incorrect. Instead, that test case should throw a WrongClassException.
ClassCastException with second level cache and entityManager.find(clazz, id)
Second Level Caching is Broken with Inherited Entities
Inconsistent behavior when fetching cached subclass entities from 2L