Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Queries on array values broken since 2.3.1

オープン
#516 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
php
領域
api

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
PHP
スター
808
フォーク
340
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

parse-community/parse-php-sdk のほかの issue

parse-community/parse-php-sdk の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。