homepage › Forums › BridgePoint/xtUML Usage and Training › select any VS select one
Tagged: instance select
- This topic has 1 reply, 2 voices, and was last updated 7 years, 5 months ago by
Lee Riemenschneider.
-
AuthorPosts
-
August 6, 2013 at 5:11 pm #1177
Dean
ParticipantI 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.
August 13, 2013 at 2:47 am #1183Lee Riemenschneider
ParticipantI 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.
-
AuthorPosts
- You must be logged in to reply to this topic.