select any VS select one

homepage Forums BridgePoint/xtUML Usage and Training select any VS select one

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1177
    Dean
    Participant

    I was recently asked to clarify the difference between “select any” and “select one”. While both selections return either a single matching instance or an empty set, the usage of select one is more restrictive. The general rule I follow is that

    select one is used only in the specific case of making a selection across a 0..1 relationship. In all other cases use select any when wanting only a single instance.

    This rule applies equally to single relationships and relationship chains where select one can only be used in chains containing only 0..1 relationships.

    #1183
    Lee Riemenschneider
    Participant

    I found the term, “a 0..1 relationship”, a little confusing. I understand that you mean “towards a 0..1 relationship end”, but you also should include “towards a 1 relationship end” and “for selecting an associative class” to cover all the cases for using “select one”. e.g., all the cases where there can only be one related instance.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.