Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle unknown mapping strategies in newer imodels #977

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RohitPtnkr1996
Copy link
Contributor

WIP

If we have a newer iModel which has a class with a mapping strategy unknown to the current ECDb runtime, the class will be loaded but, however, if we try to query it, we will end up with an "...unsupported map strategy...class wasn't loaded..." error.

Unlike the class modifier or relationship strength fields, a class's mapping strategy does not get checked when the class gets loaded.

This PR adds a new value to the MapStrategy Enum to handle an unknown strategy.
If we try to query this class, we should get a null view even if we are successful in loading the property map (due to the general uncertainty with an unknown mapping strat).

To-Do:

  1. Test CTEs to make sure they are working properly.
  2. Simulate an unknown mapping strat in an iModel to ensure everything works as expected when loading a property map fails.
  3. Increase the testing scope to cover subqueries and joins.

@RohitPtnkr1996
Copy link
Contributor Author

@khanaffan will you please take a look ?

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.

1 participant