-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MongoDB下查询中包含数组/对象时自动加 $in 的问题。 #513
Labels
Comments
当前找到的解决方法是将array强转成object,这个办法是否是推荐写法?如果是可以加到文档中吗? $where = [
'time' => (object) [
'$gte' => 1703508340 * 1000000000,
'$lt' => (1703508340 + 1) * 1000000000,
],
'ip' => [
'$in' => (object) [
'123.123.123.123',
'1.1.1.1',
'2.2.2.2',
]
]
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使用版本:
争议代码位置:
src/db/concern/WhereQuery.php:parseArrayWhereItems#504
当以此代码作为查询条件时:
实际的查询条件为:
咨询:
是否有一个方法,可以像ThinkPHP 3.2.3时的MongoModel中的写法,将以上的查询条件直接进行
json_encode
操作呢?The text was updated successfully, but these errors were encountered: