Skip to content

Conversation

@i-just
Copy link
Contributor

@i-just i-just commented Nov 24, 2025

Description

Follow-up to #18092. It requires a signature change in the BaseRelationField::existsQueryCondition() method, hence targeting 5.9.

PR #18092 resolves an issue with querying an instance of the same field in a single field layout.
This PR takes that further and improves querying an instance of the same field (with the same handle) across multiple field layouts.

Steps to reproduce:

  • follow the steps from multi-instance relation fields; empty/notempty querying #18092, but add a second entry type to the section; the entry type should pull in the assets field (don’t override the handle)
  • add an entry using this second entry type and fill out the field
  • query assets field for :empty:
    • on 5.x branch, only entry 5 is returned
    • on bugfix/multi-instance-relation-field-empty-notempty-querying branch, entries 3, 5, 6 are returned
    • correct result (result with this PR): entries 3, 5 returned
  • now query for :notempty:
    • on 5.x branch, entries 1, 2, 3, 4, 6 are returned
    • on bugfix/multi-instance-relation-field-empty-notempty-querying branch, entries 1, 2, 4 are returned
    • correct result (result with this PR): entries 1, 2, 4, 6 returned

Related issues

n/a

@i-just i-just requested a review from brandonkelly November 24, 2025 13:19
@brandonkelly brandonkelly deleted the bugfix/multi-instance-relation-field-empty-notempty-querying-part2 branch November 26, 2025 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants