As of this time of writing, this page: https://www.mongodb.com/docs/drivers/kotlin/coroutine/current/quick-reference/
Shows a quick reference of
collection.find(
Filters.eq(Movie::title.name, "Shrek")
).firstOrNull()
But none of the rest of the documents mention this anywhere else, are they confusing it with how KMongo use to do it? In here https://www.mongodb.com/docs/drivers/kotlin/coroutine/current/migrate-kmongo/#construct-queries
We see, MongoDB Kotlin Driver only supports two eq methods
Using Documents
eq(@Nullable final TItem value)
// Example
collection.find<User>(Document().append("email", email)).firstOrNull()
or using Builders
eq(final String fieldName, @Nullable final TItem value)
// Example
collection.find<User>(eq("email", email)).firstOrNull()
The API does not seem to support this syntax at all when trying it in a real project
collection.find(
Filters.eq(Movie::title.name, "Shrek")
).firstOrNull()