title: DDD: Aggregate Root accessed by another aggregate root
body: <p>I am currently developing a DDD application and am confused about how to handle a scenario where it seems as if I have to access an aggregate root from another aggregate root.  Here is an overview of my boundary contexts: </p>
  
  <p>Users can join the site and create posts on topics they are interested in.  They can also create groups and make posts specific to the group(s) they create or posts for all site members to see.  Users can also upload a photo for their profile page for other to see or upload word documents and pdf files to associate with a post.  A user can allow other user to join their group or make group invite only.</p>
  
  <p>User (represents a member of the site)<br>
  Posts(a user can create many posts)<br>
  File(a user can associate an image to appear on their profile page; associate a word document or pdf with their post)<br>
  Group(a user can create any number of groups other users can join)</p>
  
  <p>What is the proper approach to break this apart, I was thinking that each was an AR in this scenario?</p>
  
  <p>It seems as if there is a FK repationship between User and the other AR in this scenario, should this association be represented in a Value object or AR?</p>
  
  <p>Since the file AR seems to be connected to both User and Post in a FK type relationship, how should I represent this from AR's or Value objects?</p>
  
  <pre><code>One to many    
  User -&gt; Posts    
  User -&gt; File    
  User -&gt; Group    
  
  One to many    
  Posts -&gt; File
  </code></pre>