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

Validation warning should be generated when only exists is used on a choice type (or a type with one-of) #874

Open
hugohills-regnosys opened this issue Nov 21, 2024 · 0 comments
Labels
enhancement New feature or request subject: model validation This issue is about validation of Rosetta models, such as the type system

Comments

@hugohills-regnosys
Copy link
Contributor

Validation warning should be generated when only exists is used on a choice type (or a type with one-of) because it will always return true.

type VehicleOwnership: <"Representative record of vehicle ownership">
    vehicle Vehicle (1..1)

choice Vehicle: <"Representation of any vehicle">
    ElectricCar
    CombustibleVehicle
    Bicycle

func TestOnlyExists:
    inputs:
        vo VehicleOwnership (1..1)
    output:
        result boolean (1..1)
        
    set result: vo -> vehicle -> ElectricCar only exists // this will always return true because choice type is one-of
@SimonCockx SimonCockx added enhancement New feature or request subject: model validation This issue is about validation of Rosetta models, such as the type system labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request subject: model validation This issue is about validation of Rosetta models, such as the type system
Projects
None yet
Development

No branches or pull requests

2 participants