in

The ORM Foundation

Get the facts!

Subset/equality constraint using a subtype connector bug

Last post Thu, Oct 8 2015 6:26 by koneill. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • Tue, Oct 6 2015 3:14

    • koneill
    • Top 25 Contributor
      Male
    • Joined on Fri, Feb 17 2012
    • The Netherlands
    • Posts 37

    Subset/equality constraint using a subtype connector bug

    Hi there,

    I think I've run into a bug when using a subset / equality constraint in combination with a subtype connector;

    - the subset constraint can only be made by first doubleclicking the subtype connector. you can subsequently select a role as superset. The other way around (first a role as subset and a subtype connector as superset) does not work.

    - the equality constraint does not work at all with a subtype connector.

     Regars,

    Karl

    I'm using the latest norma release for VS2013 

  • Tue, Oct 6 2015 12:52 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 677

    Re: Subset/equality constraint using a subtype connector bug

     Hi Karl,

    Thanks for the alert.
    I have mentioned this to Terry & Matt so one of them will probably respond soon.
    Ken

     

  • Tue, Oct 6 2015 14:24 In reply to

    Re: Subset/equality constraint using a subtype connector bug

    Hi Karl,

    The information on this feature is linked in the January 2013 section of the readme under the title Extended Subtyping Constraint Combinations. The behavior is as expected: you can place a subset from a subtyping line to a role on a direct or indirect supertype, but not the other direction. Exclusion is also allowed, but not equality.

    The reason this was not supported is because there is a better way to model it. A subset from the role to the subtype line would indicate that every instance of the supertype that plays that role is also an instance of the subtype. The appropriate way to model this is to make the role player for the constrained role the subtype instead of the supertype, which can be done by dragging the role box onto a shape for the subtype. As an equality constraint is equivalent to a subset constraint in each direction we also block the equality constraint.

    The intent of the subset constraint was to allow a role to be optional on a supertype and mandatory on a subtype. The construct as currently implemented is much cleaner than creating a derived fact type and making it mandatory on the supertype.

    -Matt 

  • Thu, Oct 8 2015 6:26 In reply to

    • koneill
    • Top 25 Contributor
      Male
    • Joined on Fri, Feb 17 2012
    • The Netherlands
    • Posts 37

    Re: Subset/equality constraint using a subtype connector bug

     Hi Matt,

     Ah, silly me I see it now. Little bit of tunnel vision on my part (so not a bug in Norma but more like a bug in my head ;)). I corrected my model as suggested.

     Thanks,

    Karl 

Page 1 of 1 (4 items)
© 2008-2016 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service