XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.3.0.ER1
    • EAP_EWP 5.1.2
    • Hibernate
    • None
    • Hide
      The problem was caused by customers' use of custom equals/hashCode overrides. In some situations the equals and hashCodes end up changing while it is "in" internal Hibernate Maps. Hibernate was putting these entries into the map before they are fully initialized. A small change was made to "queue up" the additions until after the ResultSet is done being processed.
      Show
      The problem was caused by customers' use of custom equals/hashCode overrides. In some situations the equals and hashCodes end up changing while it is "in" internal Hibernate Maps. Hibernate was putting these entries into the map before they are fully initialized. A small change was made to "queue up" the additions until after the ResultSet is done being processed.
    • Documented as Resolved Issue
    • NEW

    Description

      https://hibernate.onjira.com/browse/HHH-7557

      I have a Map where both the key and value are entities.
      When I try to modify the map (for example, by adding an element to it), all but one of my map entries get deleted.
      The two things necessary to reproduce it seem to be:
      (1) The key entity has a many-to-one foreign key relationship to the value entity
      (2) Both key and value entities implement equals() and hashCode(), using the unique key fields for the class
      If I remove either of the above, the code works fine.
      It seems to be adding my entities to the map before initializing them, so equals() always returns true (all of the unique key fields are null).

      Attachments

        Issue Links

          Activity

            People

              brmeyer_jira Brett Meyer (Inactive)
              brmeyer_jira Brett Meyer (Inactive)
              Brett Meyer Brett Meyer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: