ne

open infix fun <V> Field<T, V>.ne(value: V)(source)
open infix fun <V> KProperty1<T, V>.ne(value: V)(source)

Matches documents where the value of a field does not equal the value.

The result includes documents which do not contain the specified field.

Example

class User(
val name: String?,
val age: Int,
)

collection.find {
User::name ne "foo"
}

External resources

See also