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

Condition with only exists operator should only validate attributes on the type that contains the condition #759

Closed
hugohills-regnosys opened this issue May 22, 2024 · 0 comments · Fixed by #776
Labels
subject: model validation This issue is about validation of Rosetta models, such as the type system

Comments

@hugohills-regnosys
Copy link
Contributor

hugohills-regnosys commented May 22, 2024

If validating an instance of type B, then when the only exists expression in the condition on super type A is executed, it should only apply to the attributes of type A.

type A:
    a1 string (0..1)
    a2 string (0..1)
    a3 boolean (0..1)

    condition:
        a1 only exists 
        or a3 = True

type B extends A:
    b1 string (0..1)

Currently, given an instance of type B with both a1 and b1 populated, the condition will fail because the only exists evaluates to false.

@hugohills-regnosys hugohills-regnosys added the subject: model validation This issue is about validation of Rosetta models, such as the type system label May 22, 2024
SimonCockx added a commit that referenced this issue Jun 18, 2024
@SimonCockx SimonCockx mentioned this issue Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subject: model validation This issue is about validation of Rosetta models, such as the type system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant