all

open val <E> Field<T, Collection<E>>.all: Field<T, E>(source)
open val <E> KProperty1<T, Collection<E>>.all: Field<T, E>(source)

The all positional operator: selects all elements of an array.

This operator is used to declare an update that applies to all items of an array.

Example

class User(
val name: String,
val pets: List<Pet>,
)

class Pet(
val name: String,
val age: Int,
)

users.updateMany {
User::pets.all / Pet::age inc 1
}

External resources