div

@JvmName(name = "divFieldArrayIntoField")
open operator fun <T : Any, V> Field<Document, Collection<T>>.div(child: Field<T, V>): Field<Document, V>(source)
@JvmName(name = "divFieldArrayIntoProperty")
open operator fun <T : Any, V> Field<Document, Collection<T>>.div(child: KProperty1<T, V>): Field<Document, V>(source)
@JvmName(name = "divPropertyArrayIntoField")
open operator fun <T : Any, V> KProperty1<Document, Collection<T>>.div(child: Field<T, V>): Field<Document, V>(source)
@JvmName(name = "divPropertyArrayIntoProperty")
open operator fun <T : Any, V> KProperty1<Document, Collection<T>>.div(child: KProperty1<T, V>): Field<Document, V>(source)

Refers to child as a nested field of the current collection field.

Examples

class User(
val id: Int,
val profiles: List<Profile>,
)

class Profile(
val name: String,
)

// Refer to the name
println(User::profiles / Profile::name)
// → `profiles.name`