title: RavenDB - When I do want a reference to another Root Aggregate
body: <p>I have been using DDD for a while know so I am comfortable with the idea of aggregates.  At first I did have troubles wrapping my head around not using/persisting references to other root aggregates but I think I'm on board... so:</p>
  
  <ul>
  <li>Storing a root aggregate as a one document.... check</li>
  <li>Using denormalized references containing properties that do not change or rarely change.... check</li>
  </ul>
  
  <p>For the times that I DO want to have a full reference to another root aggregate, I understand it is recommended that I persist a reference to its ID and can use the RavenDB client API's <em>Includes</em> to retrieve all the entities efficiently.</p>
  
  <p>That handles the data part, what I haven't seen is the best way to handle this in my entity class:</p>
  
  <ol>
  <li>Have both <em>Product</em> and <em>ProductId</em> properties in my class using <strong>[JsonIgnore]</strong> on the <em>Product</em> to ensure it doesn't get persisted with the document.
  <ul>
  <li>The full object graph could then be glued back together in the repository (using API's <em>Includes</em> for efficiency) or I could inject a service into the entity that would fetch <em>Product</em> lazily (possible N+1 hit)</li>
  </ul></li>
  <li>Glue it back together in a ViewModel.  I don't like this idea as I could end up with an unexpected NULL reference in the domain if not used correctly.</li>
  <li>Some other obvious way that I'm not seeing?</li>
  </ol>
  
  <p>Thoughts?</p>