http://blog.csdn.net/crazyjixiang/article/details/6668288 suppose I have the following datastructure: var user = {_id: 'foo', age: 35}; var post = {_id: '...', author: {$ref: user, $id: 'foo'},...}; How can I query all posts which references user[foo
@DBref文档关联,在按该类型查询的时候,在字段名后加上关联表的字段名即可,如: Criteria.where("bloggroup.$id"), $id代表关联表的oid字段. or和and联合查询 比如查询 (A = 1 and b = 2 )or (A = 3 and b =4),or的数量不确定, 那么采用定义一个Criteria数组,将条件组记入数组中,然后将数组指定给orCriteria方法. @Override public List<Blog> find(