java - How to write the Criteria(Query) for MongoDB -


i have written mongo query in robomongo , want write query criteria , query

db.getcollection('collection').find({"_class": "a", devices : {$exists:true}, $where:'this.devices.value.length>0'}) 

in java writing

final query query = query.query(criteria.where("_class").is(typealias).and("devices").exists(true).and("devices.value.length>0")); 

but, not working. can guide me on this?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -