Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0
    • Fix Version/s: 5.2.2, 5.1.10
    • Component/s: None
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true

      Description

      When loading multiple entities via:

      List<SomeClass> list = session.byMultipleIds(SomeClass.class).multiLoad(ids);
      

      the resulting list may have unexpected properties:

      1. If the fetch for SomeClass contains left outer joins, some instances may be contained multiple times in the resulting list.
      2. Both ids and the returned List<> are ordered collections. The principle of least surprise dictates, that both collections have the same order. In pseudo-code: list.get(j).getId().equals(ids.get(j)) should be true for any j. Unless of course a different behavior is documented (it's not, as far as I can tell)
      3. If an entity for a given id cannot be found, I expect a null in the returned list at the index of that id. That's not the case.

      It would be nice, if either these failures got fixed or the documentation got adjusted to reflect the behavior.

      Thanks.

      (this is related to HHH-7572 Closed )

        Attachments

          Issue links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: