hey, guys, I meet a problem about mongodb, there i...
# kmongo
k
hey, guys, I meet a problem about mongodb, there is no problem with insert, but the
findMany
method, I don't know how to fix it, can you help me out ?
Copy code
fun findMany(name: String? = null, age: Int? = null): List<User> {
        val queryParams = mutableListOf<Bson>()

        if (name != null) {
            queryParams.add(Filters.eq(User::name.name, name))
        }

        if (age != null) {
            queryParams.add(Filters.eq(User::age.name, age))
        }

        return users.find(Filters.and(queryParams)).toList()
    }
c
Which driver are you using? None of the code you showed has any imports in
org.mongodb