`orWhere()`/`orWhereIn()` breaks Query Builder
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
調査の方向性
Start by locating the Stache query builder methods used by whereIn() and orWhereIn(), then compare how they handle the reproduced query. Run a similar query against entries in the pages and events collections, including IDs from another collection. Done means the combined query returns the expected matching entries; the issue mentions suggested changes in a screenshot but names no files or tests.
索引モデルが issue の本文から書いたものです。
説明
Bug description
I'm using the Stache for querying entries.
I try to query some entries from a set of collections, but I need to include some entries from another collection by ID.
This works perfectly fine:
Entry::query()
->whereIn('collection', ['pages', 'events'])
->get();
But adding ->orWhereIn('id', ['1234','456']) returns zero results:
Entry::query()
->whereIn('collection', ['pages', 'events'])
->orWhereIn('id', ['1234','456'])
->get();
According to Ryan, this could be solved by modifying lines 25 and 42, like in that screenshot below.
How to reproduce
Run a similar query as written in the description.
Logs
nope
Environment
Environment
Application Name: Statamic
Laravel Version: 11.44.7
PHP Version: 8.4.13
Composer Version: 2.8.11
Environment: local
Debug Mode: ENABLED
URL: voicesforhealthykids.test
Maintenance Mode: OFF
Timezone: America/Chicago
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file
Livewire
Livewire: v3.6.3
Statamic
Addons: 4
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.53.1 PRO
Statamic Addons
marcorieser/statamic-livewire: 4.4.3
rias/statamic-color-swatches: 2.3.0
statamic/seo-pro: 6.6.3
transformstudios/front: 3.0.2
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
- 主要言語
- PHP
- スター
- 4.9k
- フォーク
- 647
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 100
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
statamic/cms のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
assets
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
accessibility
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
antlers
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
FrameworkBundle SecurityBundle
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
symfony/symfony-docs#23277 ·
メンテナーはふだん 3 日以内に返信
-
[Sync EN] hard link does not need special permissions対応中かも @lacatoire が今日担当しました。 オープンsync-en
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
メンテナーはふだん 4 日以内に返信
-
bug mod:appointments
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
3pontos-tech/gil-benefits#303 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信