[content] Resolve concrete step relationship classes#1459
Merged
Conversation
🦋 Changeset detectedLatest commit: fc252fd The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses iTwin/presentation issue #1442 by ensuring relationship-path resolution yields concrete relationship classes per step (not just concrete entity endpoints), enabling downstream ECSQL consumers to distinguish polymorphic relationship subclasses.
Changes:
- Extended
ECSql.createRelationshipPathJoinInfoto return per-step selectors (steps[]) for relationship/source/targetECClassIdvalues. - Updated content source resolution queries and row-mapping to project/group by concrete relationship classes and write them into
ResolvedPath.step.relationshipName. - Updated/added unit tests, API report, docs, and a changeset for the shared-package API change.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/shared/src/shared/ecsql-snippets/ECSqlJoinSnippets.ts | Adds steps[] to join-info with selectors for concrete relationship/source/target class ids; supports both nav-property and link-table steps. |
| packages/shared/src/test/ecsql-snippets/ECSqlJoinSnippets.test.ts | Updates tests to assert steps[] and adds coverage for source/target class id selectors. |
| packages/shared/api/presentation-shared.api.md | Updates extracted public API to include RelationshipPathStepJoinInfo and RelationshipPathJoinInfo.steps. |
| packages/content/src/content/ResolveContentSources.ts | Projects and groups by relationship class ids per step in resolution queries; maps rows back to concrete relationshipName per step. |
| packages/content/src/test/Content.test.ts | Updates mocks and expectations to account for relationship-class projection and the new join-info API. |
| packages/content/src/content/ContentTarget.ts | Clarifies ResolvedPath contract: all step classes (source/target/relationship) are concrete and subclasses produce separate paths. |
| .changeset/yummy-lands-think.md | Declares a version bump + changelog entry for the public API update in @itwin/presentation-shared. |
grigasp
reviewed
Jul 22, 2026
grigasp
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1442
Updated
createRelationshipPathJoinInfoto returnRelationshipPathStepJoinInfoper step. This info contains selectors for source, target and relationship class ids. They can be used in ECSQL to query concrete classes for particular step.Updated content source resolved to resolve concreate relationship classes for each step when resolving relationship path.