We're updating the issue view to help you get more done. 

multiLoad behavior

Description

When loading multiple entities via:

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

Environment

None

Status

Assignee

Steve Ebersole

Reporter

Hendrik Schreiber

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

5.1.0

Priority

Major