Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP 6.0.0
    • Fix Version/s: EAP 6.1.0
    • Component/s: Hibernate
    • Labels:
      None

      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).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  brmeyer Brett Meyer
                  Reporter:
                  brmeyer Brett Meyer
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: