title: Collection-Property in Domain-Object - when to use?
body: <p>I have difficulties to model domain classes when it comes to one-to-many relationships.</p>
  
  <p>Most search results talk specifically about DDD and the so called Aggregate Root. For example an Order class with order items.</p>
  
  <p>In my concrete scenario I have a "Report" class, which can have references to other domain objects. The property "References" is the issue:</p>
  
  <pre><code>{
    "Id": "someReportId",
    "References":
    [
      {
        "ObjectType": "Machine",
        "ObjectId": "someMachineId"
      },
      {
        "ObjectType": "Address",
        "ObjectId": "someAddressId"
      }
    ],
    "Answers": 
    {
      "question1": 42,
      "question2": "some answer"
    }
  }
  </code></pre>
  
  <p>To me it made sense to model "References" as Property of the Domain-Object. The first consumer of my API had no problems with it.</p>
  
  <p>The second consumer however needs to save and delete each "Reference" individually. My CRUD-Service only lets you save or delete a whole "Report"-Object.</p>
  
  <p>For that reason I deleted the Property and moved it into a seperate service. But I'm afraid I don't see the line when I can use collection properties. Is there some rule of thumb?</p>