You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ECDb should allow widening array bounds on schema update - #1688
Schema differencing in the ecschema-editing treats a change to an array property's minOccurs/maxOccurs as an ordinary, auto-mergeable difference.
This used to contradicts ECDb's behavior which rejects changing array bounds on an existing property during a schema upgrade, leading to the merge passing but the schema import failing during transformations.
This PR relaxes the rule by allowing a schema update to only widen array bounds.
The linked itwinjs PR mirrors this behavior in the schema diff validator which reports a conflict only when array bounds are narrowed on either or both sides.
RohitPtnkr1996
changed the title
ECDb should allow widening array bounds on schema import/update
ECDb should allow widening array bounds on schema update
Nov 3, 2026
@RohitPtnkr1996 though it looks fine but what is the issue? We do not enforce any of these bounds in the first place. For now this fine but I would have no issue if it get narrower or widens.
@RohitPtnkr1996 though it looks fine but what is the issue? We do not enforce any of these bounds in the first place. For now this fine but I would have no issue if it get narrower or widens.
The transformer team flagged a discrepancy where the schema diff in ecschema-editing allows array bounds to change without a conflict, however once the schema merges, the update is rejected by ECDb as it does not allow array bounds changing at all.
I originally changed ecschema-editing to mirror ECDb, but after discussion with Julija and Rob, we decided to relax this is ECDb to only allow widening array bounds.
The same behavior is applied to ecschema-editing which now flags narrowing array bounds as a conflict.
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
backported to imodel02The changes in this PR have been backported to imodel02 successfully.
3 participants
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.
Schema differencing in the ecschema-editing treats a change to an array property's minOccurs/maxOccurs as an ordinary, auto-mergeable difference.
This used to contradicts ECDb's behavior which rejects changing array bounds on an existing property during a schema upgrade, leading to the merge passing but the schema import failing during transformations.
This PR relaxes the rule by allowing a schema update to only widen array bounds.
The linked itwinjs PR mirrors this behavior in the schema diff validator which reports a conflict only when array bounds are narrowed on either or both sides.