BatchFetchQueue#batchLoadableEntityKeys unnecessarily holds entity key objects, when only the identifier is needed. Also, it’s a bit of a bummer that initializers have to maintain a separate set of entity keys which they use to then eagerly load data when reaching Initializer#endLoading. I would suggest we rework BatchFetchQueue#batchLoadableEntityKeys to rather hold a new object, which contains a flag eager and at the end of processing, we iterate through BatchFetchQueue#batchLoadableEntityKeys and initialize the ones with eager flags set. |