exists

abstract fun exists()(source)

Matches documents that contain the specified field, including values where the field value is null.

Example

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

collection.find {
User::name {
exists()
}
}

External resources

See also

Identical, but does not match elements where the field is null.