Py学习  »  MongoDB

mongodb中的条件更新多?[副本]

Patrickkx • 5 年前 • 1296 次点击  

我试过这些查询,但返回错误。 一。

db.usercollection.find(
{$where: "(this.name.length > 40)"}
).limit(2);

output :error: {
    "$err" : "TypeError: Cannot read property 'length' of undefined near '40)' ",
    "code" : 16722
}

这在2.4.9中有效,但我的版本是2.6.5

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/55692
 
1296 次点击  
文章 [ 5 ]  |  最新文章 5 年前