Queries on array values broken since 2.3.1
まだ誰も着手していません。
評価
調査の方向性
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 の本文から書いたものです。
説明
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
- 主要言語
- PHP
- スター
- 808
- フォーク
- 340
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
parse-community/parse-php-sdk のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 72/100
parse-community/parse-php-sdk#529 · コメント 1 件 ·
-
"unauthorized: master key is required" error on aggregate ParseQuery despite the master key is setオープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
parse-community/parse-php-sdk#466 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
parse-community/parse-php-sdk#465 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
parse-community/parse-php-sdk#457 · コメント 1 件 ·
-
parse query for phpオープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
parse-community/parse-php-sdk#456 · コメント 1 件 ·
parse-community/parse-php-sdk の issue をすべて見る
似ている issue
-
Talk Review
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
socallinuxexpo/scale-drupal#351 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
code4romania/cpc#47 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
mautic/api-library#351 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
nunomaduro/collision#371 ·
-
Lead create/update: a product row without a "product_id" key passes LeadForm validation and fails in the database (500)対応中かも @Arslan-TR が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
krayin/laravel-crm#2681 ·
メンテナーはふだん 2 日以内に返信