Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Queries on array values broken since 2.3.1

Đang mở
#516 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
php
Lĩnh vực
api

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ả

bounty:$20 type:bug
New Issue Checklist

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của parse-community/parse-php-sdk

Tất cả issue của parse-community/parse-php-sdk

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.