Uploaded image for project: 'Spring Modules'
  1. Spring Modules
  2. MOD-197

HashCodeCacheKeyGenerator can't cache bidirectional associations objects

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.5
    • Fix Version/s: None
    • Component/s: CACHE
    • Labels:
      None
    • Environment:
      Linux JDK5.0 Spring 2.0rc2 Hibernate 3.2.0rc3 ehcache 1.2.1

      Description

      Tow class User and Type:
      User:
      name:String
      type:Type

      Type
      name:String
      users:List<User>

      User and Type is bidirectional associations.

      a cached method: List getAllUser(Type type)

      when caching the method, spring-modules will report StackOverflowError.

      Now I'm setting HashCodeCacheKeyGenerator.generateArgumentHashCode to false, running ok.

      But I think for bidirectional associations objects, HashCodeCacheKeyGenerator using recursion is not perfection.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              irbouho Omar Irbouh
              Reporter:
              hubertstar Hubert Star
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: