我的文档中有一个“首选项”字段,数据如下:
{"visibility":"true","create":"2013-06-15 15:09:51","update":1371301791}
{"visibility":"false","create":"2013-06-15 15:09:51","update":1371301791}
我想获得可见性='true'的行。我尝试过这样的事情但没有结果:
$datas = $this->get('doctrine.odm.mongodb.document_manager')
->getRepository('ApplicationMtbeBundle:myDoc')
->createQueryBuilder()
->field("preferences.visibility")->equals("true")
我该怎么做?