batch By Own Fields
suspend fun <T : NodeObject, C : SelectiveNodeExecutionContext<T>> batchByOwnFields(contexts: List<C>, resolve: suspend (Group<T, C, Set<FieldCoordinate>>) -> Map<C, FieldValue<T>>): Map<C, FieldValue<T>>(source)
Partitions contexts by the fields selected directly on the node and invokes resolve once for each group.
Nested selections do not affect the grouping key. Group.selections retains any-member navigation over the complete selections in the group.
For example, suppose three Product contexts have these selections:
context 1: details { summary }
context 2: details { rating }
context 3: nameContent copied to clipboard
The resulting groups are:
group 1:
key: { Product.details }
contexts: [context 1, context 2]
selections:
details {
summary
rating
}
group 2:
key: { Product.name }
contexts: [context 3]
selections:
nameContent copied to clipboard