div
open operator fun <V, V2> KProperty1<T, Collection<V>>.div(other: Field<V, V2>): Field<T, V2>(source)
open operator fun <V, V2> Field<T, Collection<V>>.div(other: KProperty1<V, V2>): Field<T, V2>(source)
open operator fun <V, V2> KProperty1<T, Collection<V>>.div(other: KProperty1<V, V2>): Field<T, V2>(source)
Combines Kotlin properties into a path usable to point to any item in an array.
Example
class User(
val grades: List<Grade>
)
class Grade(
val name: Int
)
collection.find {
User::grades / Grade::name eq 19
}
Content copied to clipboard
This function is a shorthand for any:
collection.find {
User::grades.any / Gradle::name eq 19
}
Content copied to clipboard