Hi, I am just tryin to follow the initial tutorial code and am getting an error thart the eq function is not found, used as an infix call to findOne().
Is there something I need to add a reference to or import for this? I can see eq in org.litote.kmongo.MongoOperator but that seems to be an enum not a function.
Code is just straight off your intro page:
import org.litote.kmongo.* //NEEDED! import KMongo extensions
data class Jedi(val name: String, val age: Int)
val client = KMongo.createClient() //get com.mongodb.MongoClient new instance
val database = client.getDatabase("test") //normal java driver usage
val col = database.getCollection<Jedi>()
col.insertOne(Jedi("Luke Skywalker", 19))
val yoda : Jedi? = col.findOne(Jedi::name eq "Yoda")
Thanks,
Abu Rashid.