in

The ORM Foundation

Get the facts!

Error in exclusive-or subtyping population

Last post 10-18-2011 4:35 by Nieves85. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-17-2011 10:20

    Error in exclusive-or subtyping population

    Hello all,

     

    I have created a hierarchy based on subtying connectors using the Exclusive-Or constraint between subtypes.When I am testing the hierarchy through population I create an instance of the father and then I assign that instance to two different types of children. 

    It should raise some error as the hierarchy says that it has to be only one type of child; but instead it is allowing this situation. The NORMA version that I have installed  is 1.0.1106.6295 2011-06CTP.

    I put the verbalisation in case someone wants to try it.

     
    Wait is an entity type.
    Reference Scheme: Statement has Statement_Id.
    Reference Mode: .Id.

    Fact Types:
    Each Wait is an instance of Main Statement.


    Examples: 1
     
    Save Context is an entity type.
    Reference Scheme: Statement has Statement_Id.
    Reference Mode: .Id.

    Fact Types:
    Each Save Context is an instance of Main Statement.


    Examples: 1
     
     

    Can you give me some input about what is the possible problem?
     
    Thanks in advance,
     
    Nieves
     

     

  • 10-17-2011 18:07 In reply to

    Re: Error in exclusive-or subtyping population

    Hello Nieves,

    Matt is the best person to answer your query however he is a bit busy so his response may be delayed a little.

    In the meantime, it would be helpful if you could post a .png image of your model as explained in this post: http://www.ormfoundation.org/forums/p/589/1775.aspx#1775

    Thanks

    Ken

     

     

      

      

  • 10-17-2011 18:49 In reply to

    Re: Error in exclusive-or subtyping population

    Hello Nieves,

    You are absolutely right that there should be a violation error in this case. Unfortunately, the sample populations are not currently validated against constraints other than single role uniqueness, simple mandatory, and disjunctive mandatory. The validation you're reasonably expecting in the tool is simply not implemented, and any such implementation of a constraint engine against the in-memory sample population is non-trivial, effectively requiring a live in-memory database with soft constraint checking to produce validation errors instead of blocking the data entry.

     -Matt

  • 10-18-2011 4:35 In reply to

    Re: Error in exclusive-or subtyping population

    Hi Ken and Matt,

    Thanks Ken for your fast reply but based on Matt answer is a missig feature :S. 

    Mat, I understand the implementation issues of this feature, although I´d recommend putting this void in the checking in some kind of release information note for future users. However, I am glad to have obtained a fast answer to the problem.

    However, I have another question regarding this subtyping population issue that I don´t know it if fails because of this not implemented feature or because of a modelling issue. In my hierarchy (see image),

    I want that my main statement has to be at most one instance between its children and the children of its father. I explain through the 3 possible scenarios:

    • First,  If I have an instance of Statement called ´St1´, and that St1 is also an instance of Main Statement. That St1 should also be able to be an instance of Logger.
    • Second, I can also have the situation that another instance of Statement called ´St2´is an instance of Logger but not of Main Statement
    • Third, I can have an instance of Statement called ´St3´ and for being an instance of Assignment, it also has to be an instance of Main Statement and not any other type of Statement.

    Thanks in advance,

    Nieves


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