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

Ansible warning on jinja2 braces on when -

Parsing a protocol message from Go by Java -

html - How to custom Bootstrap grid height? -