Skip to content

[content] Resolve concrete step relationship classes#1459

Merged
saskliutas merged 6 commits into
nextfrom
resolve-concrete-rel-classes
Jul 23, 2026
Merged

[content] Resolve concrete step relationship classes#1459
saskliutas merged 6 commits into
nextfrom
resolve-concrete-rel-classes

Conversation

@saskliutas

Copy link
Copy Markdown
Member

Closes #1442

Updated createRelationshipPathJoinInfo to return RelationshipPathStepJoinInfo per 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.

Copilot AI review requested due to automatic review settings July 21, 2026 14:45
@saskliutas
saskliutas requested a review from a team as a code owner July 21, 2026 14:45
@changeset-bot

changeset-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fc252fd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@itwin/presentation-shared Minor
@itwin/presentation-core-interop Patch
@itwin/presentation-hierarchies-react Patch
@itwin/presentation-hierarchies Patch
@itwin/unified-selection Patch

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.createRelationshipPathJoinInfo to return per-step selectors (steps[]) for relationship/source/target ECClassId values.
  • 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.

Comment thread .changeset/yummy-lands-think.md
Comment thread packages/shared/src/test/ecsql-snippets/ECSqlJoinSnippets.test.ts Outdated
Comment thread packages/shared/src/test/ecsql-snippets/ECSqlJoinSnippets.test.ts Outdated
Comment thread packages/shared/src/shared/ecsql-snippets/ECSqlJoinSnippets.ts
Comment thread packages/content/src/content/ResolveContentSources.ts Outdated
Comment thread packages/content/src/content/ResolveContentSources.ts Outdated
Comment thread packages/content/src/test/Content.test.ts Outdated
@saskliutas
saskliutas merged commit 91c6f0c into next Jul 23, 2026
6 checks passed
@saskliutas
saskliutas deleted the resolve-concrete-rel-classes branch July 23, 2026 13:42
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.

content: resolveContentSources does not resolve concrete relationship classes in resolved paths

3 participants