This seems to have been alluded to in [this comment|https://hibernate.atlassian.net/browse/HHH-10263?focusedCommentId=74788&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-74788] on HHH-10263: {quote} We discussed as a team and came to the agreement that long term the best option here is to add entity-graph support to MultiIdLoadAccess. {quote} I'm finding MultiIdentifierLoadAccess very useful - it would be great if at the same time as loading a bunch of `Leaf` objects by their IDs, we could initialise their `Branch` and `Tree` associations as well. I imagine usage something like this:
{code:java} return session.byMultipleIds(Leaf.class) .leftJoinFetch("branch as b") .leftJoinFetch("b.tree") .multiLoad(leafIds); {code}
I suppose that if you joined a many-to-one association you'd have to manage the de-duplication before returning the results. |
|