Uploaded image for project: 'Hibernate ORM'
  1. HHH-9028

ClassCastException with second level cache and entityManager.find(clazz, id)

    Details

    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Requires Release Note:
      Affirmative
    • Last commented by a user?:
      true
    • Sprint:

      Description

      From my post on the dev list:

      We just hit the ClassCastException problem with 2nd level cache
      reported by other people.

      But... we're using 4.3.4.Final so I'm not sure this issue has really
      been fixed with 4.3.4.Final.

      Typically, we have the following hierarchy:

      AbstractUser
          TechnicalUser (id = 1)
          AccountManager (id = 2)
      

      entityManager.find(AccountManager.class, 1) returns the TechnicalUser
      1 and not null if the 2nd level cache is enabled (and the object is in
      the cache).

      I'm pretty sure it's not the expected behavior.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: