doesNotExist

open fun Field<T, *>.doesNotExist()(source)

Matches documents that do not contain the specified field. Documents where the field if null are not matched.

Example

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

collection.find {
User::age.doesNotExist()
}

External resources

See also

Only matches documents that are specifically null.