Litote / kmongo

[deprecated] KMongo - a Kotlin toolkit for Mongo
https://litote.org/kmongo/
Apache License 2.0
781 stars 75 forks source link

How to find document by embedded property. #399

Closed urosjarc closed 1 year ago

urosjarc commented 1 year ago

How to make typed query if you want to search by inner property of embbeded type?

db.getCollection<Narocnina>().find(Narocnina::uporabnik eq id_uporabnik, Narocnina::produkt::tip eq tip_produkta)
                                                                         ---------------------------------------
                                                                         This stuff fails :(
mervyn-mccreight commented 1 year ago

Is https://litote.org/kmongo/typed-queries/#nested-properties-and-operator what you are searching for?

urosjarc commented 1 year ago

Thank you that solves my issue.