Skip to content

Conversation

@cportele
Copy link
Contributor

@cportele cportele commented Jun 26, 2025

This pull request removes the checks in FeatureSchema that explicitly set PRIMARY_GEOMETRY, PRIMARY_INSTANT, PRIMARY_INTERVAL_START, and PRIMARY_INTERVAL_END roles.

Instead a new TypesResolver (DefaultRolesResolver) is executed as the final step during hydration of the SQL/Oracle providers. If no primary geometry is explicitly set, the first spatial property is assigned this role. If no primary instant or interval is explicitly set, the first temporal property is assigned this role.

Note that other roles including the primary interval start or end are only applied, if explicitly set in the provider schema.

Closes ldproxy/ldproxy#1412

FeatureSchema: remove checks that explicitly set PRIMARY_GEOMETRY, PRIMARY_INSTANT, PRIMARY_INTERVAL_START, and PRIMARY_INTERVAL_END roles

Closes ldproxy/ldproxy#1412
@cportele cportele requested a review from azahnen as a code owner June 26, 2025 17:12
If no primary geometry is explicitly set, the first spatial property is assigned this role. If no primary instant or interval is explicitly set, the first temporal property is assigned this role.

These defaults are explicitly set in the hydration step. This has to be done after the schema is complete. The new DefaultRolesResolver is executed as the final resolver.

Note that other roles including the primary interval start or end are only applied, if explicitly set in the provider schema.
@cportele cportele changed the title remove checks Set default roles in new resolver Jun 27, 2025
@cportele
Copy link
Contributor Author

@azahnen - I have added the new resolver, the PR should be ready for your review. I have also updated the first comment.

Copy link
Collaborator

@azahnen azahnen left a comment

Choose a reason for hiding this comment

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

LGTM

@azahnen azahnen merged commit c467175 into master Jun 29, 2025
3 checks passed
@azahnen azahnen deleted the issue-1412 branch June 29, 2025 06:14
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.

Incorrect evaluation of default feature property roles

3 participants