Skip to content

Expand examples for NestedQuery to show how to delegate a QueryData impl#23686

Merged
alice-i-cecile merged 2 commits intobevyengine:mainfrom
chescock:NestedQuery-docs
Apr 9, 2026
Merged

Expand examples for NestedQuery to show how to delegate a QueryData impl#23686
alice-i-cecile merged 2 commits intobevyengine:mainfrom
chescock:NestedQuery-docs

Conversation

@chescock
Copy link
Copy Markdown
Contributor

@chescock chescock commented Apr 6, 2026

Objective

Demonstrate how to use NestedQuery to implement relational queries.

There is more design work required before making first-party relational queries, but third-party implementations are already possible using NestedQuery. The documentation does not make it clear how to actually implement them, though, and the only real example is buried in the PR description of #21557.

Solution

Expand the examples for NestedQuery to include the implementation of a Parent<D> relational query. Keep one example that uses #[derive(QueryData)] with a method on the generated Item type, but also add an example with a manual QueryData impl that delegates everything.

@chescock chescock added C-Docs An addition or correction to our documentation A-ECS Entities, components, systems, and events S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 6, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in ECS Apr 6, 2026
@alice-i-cecile alice-i-cecile added X-Uncontroversial This work is generally agreed upon D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes labels Apr 6, 2026
@alice-i-cecile alice-i-cecile moved this from Needs SME Triage to SME Triaged in ECS Apr 6, 2026
@kfc35 kfc35 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 8, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 9, 2026
@alice-i-cecile alice-i-cecile removed this pull request from the merge queue due to a manual request Apr 9, 2026
Co-authored-by: Kevin Chen <chen.kevin.f@gmail.com>
@alice-i-cecile alice-i-cecile enabled auto-merge April 9, 2026 01:03
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 9, 2026
Merged via the queue into bevyengine:main with commit 35ee4bf Apr 9, 2026
38 checks passed
@github-project-automation github-project-automation bot moved this from SME Triaged to Done in ECS Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ECS Entities, components, systems, and events C-Docs An addition or correction to our documentation D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants