Queries on array values broken since 2.3.1
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Start at the equalTo query serialization path in the PHP SDK and reproduce the ParseRole query shown in the issue. Compare the generated request with the expected array-value query documented in the linked Parse guide. Done means pointer queries against array-valued fields return the matching roles without breaking scalar equalTo queries.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server and the Parse PHP SDK.
We're not running the latest Parse server version, hence I haven't checked the last item above.
Issue Description
The fix for equalTo in 2.3.1 broke queries on array values.
Steps to reproduce
For example, to fetch all roles for a specific user:
$query = ParseUser::query();
$parseUser = $query->get("someUserId", true);
$query = ParseRole::query();
$query->equalTo("users", $parseUser);
$parseRoles = $query->find(true);
Actual Outcome
In previous versions, the query sent to Parse would look like:
{
"users": {
"__type": "Pointer",
"className": "_User",
"objectId": "someUserId"
}
}
Which would give us the roles for that user back.
Expected Outcome
In 2.3.1 the query became:
{
"where": {
"users": {
"$eq": {
"__type": "Pointer",
"className": "_User",
"objectId":"someUserId"
}
}
}
}
Which does not give any roles back. users on _Role is an array with a single user in our case.
Environment
Parse PHP SDK
- SDK version: 2.3.2
- PHP version: 8.2.6
Server
- Parse Server version: 4.3.0
- Operating system: Debian
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): AWS
Database
- System (MongoDB or Postgres): MongoDB
- Database version: 3.6
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): AWS
- Ngôn ngữ chính
- PHP
- Star
- 808
- Fork
- 341
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của parse-community/parse-php-sdk
-
Undefined array key "result"Đang mởtype:feature
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
parse-community/parse-php-sdk#518 · 1 bình luận ·
-
"unauthorized: master key is required" error on aggregate ParseQuery despite the master key is setĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
parse-community/parse-php-sdk#466 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
parse-community/parse-php-sdk#465 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
parse-community/parse-php-sdk#457 · 1 bình luận ·
-
parse query for phpĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
parse-community/parse-php-sdk#456 · 1 bình luận ·
Tất cả issue của parse-community/parse-php-sdk
Issue tương tự
-
Infrastructure: actions Module: zmscitizenapi Module: zmsentities php Type: Bug unit tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
it-at-m/eappointment#3480 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CI: composer install fails — league/flysystem 1.x blocked by security advisory GHSA-cxf4-7mrp-vvprĐang mởdevops type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs approval
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 3 ngày
-
product / avatars product / self-hosted product / storage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
appwrite/appwrite#13985 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày