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

html - How to custom Bootstrap grid height? -

javascript - Understanding ExtJS Framework Syntax -

tsql - sp_execute_external_script @language = N'R' -