简体   繁体   中英

Mongodb morphia complex query

I want to do this query in Java with Morphia Driver for Mongo DB, this how i do in mongo shell (and works)

db.prova.find({"username":"prova", "roles":"user"})

You should check out the docs . There's a number of examples and reference material to get you started.

(The tutorial in the comment above is really old and no longer matches the current Morphia releases, for what it's worth.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM