title: Domain model for an optional many-many relationship
body: <p>Let's say I'm modeling phone numbers. I have one entity for <code>PhoneNumber</code>, and one for <code>Person</code>. There's a link table that expresses the link (if any) between the <code>PhoneNumber</code> and <code>Person</code>. The link table also has a field for <code>DisplayOrder</code>.</p>
  
  <p>When accessing my domain model, I have several Use Cases for viewing a <code>Person</code>. </p>
  
  <ol>
  <li>I can look at them without any <code>PhoneNumber</code> information.  </li>
  <li>I can look at them for a specific <code>PhoneNumber</code>.  </li>
  <li>I can look at them and all of their current (or past) <code>PhoneNumbers</code>.</li>
  </ol>
  
  <p>I'm trying to model <code>Person</code>, not only for the standard CRUD operations, but for the (un)assignment of <code>PhoneNumbers</code> to a <code>Person</code>. I'm having trouble expressing the relationship between the two, especially with respects to the <code>DisplayOrder</code> property. I can think of several solutions but I'm not sure of which (if any) would be best.</p>
  
  <ol>
  <li>A <code>PhoneNumberPerson</code> class that has a <code>Person</code> and <code>PhoneNumber</code> property (most closely resembles database design)  </li>
  <li>A <code>PhoneCarryingPerson</code> class that inherits from <code>Person</code> and has a <code>PhoneNumber</code> 
  property.  </li>
  <li>A <code>PhoneNumber</code> and/or <code>PhoneNumbers</code> property on <code>Person</code> (and vis-a-versa, a <code>Person</code> property on <code>PhoneNumber</code>)</li>
  </ol>
  
  <p>What would be a good way to model this that makes sense from a domain model perspective? How do I avoid misplaced properties (<code>DisplayOrder</code> on <code>Person</code>) or conditionally populated properties?</p>