title: Servicestack ORMLite update child collection
body: <p>I can see you can do stuff like this in ORMLite:</p>
  
  <pre><code>var customer =  new Customer {
      Name = "Customer 1",
      PrimaryAddress = new CustomerAddress {
          AddressLine1 = "1 Australia Street",
          Country = "Australia"
      },
      Orders = new[] {
          new Order { LineItem = "Line 1", Qty = 1, Cost = 1.99m },
          new Order { LineItem = "Line 2", Qty = 2, Cost = 2.99m },
      }.ToList(),
  };
  
  db.Save(customer, references:true);
  </code></pre>
  
  <p>But what about updating child collections? </p>
  
  <p>How is this done?</p>
  
  <p>To expand on this.</p>
  
  <p>I have a UserAccount class and an Image class internal to UserAccount:</p>
  
  <pre><code>public class UserAccount 
  {
      [AutoIncrement]
      public int Id {
          get ;
          set;
      }
  
      public UserAccount()
      {
          Images = new List&lt;UserImage&gt;();
      }
  
      public List&lt;UserImage&gt; Images { get; protected set; }
  
      public UserImage Image { get; set; }
  
      public class UserImage
      {
          public UserImage()
          {
              Created = DateTime.Now;
          }
  
          public UserImage(string name)
          {
              Value = name;
              Created = DateTime.Now;
          }
  
          public string Value { get; set; }
      }
  }
  </code></pre>
  
  <p>Doing this: </p>
  
  <pre><code>var fullImage = new UserAccount.UserImage(newImageUrl);
  fullImage.IsDefault = true;
  user.Image = fullImage;
  db.Update (fullImage);
  </code></pre>
  
  <p>Doesn't work.</p>
  
  <p>Doing this:</p>
  
  <pre><code>var fullImage = new UserAccount.UserImage(newImageUrl);
  fullImage.IsDefault = true;
  user.Images.Add(fullImage);
  db.Update (fullImage);
  </code></pre>
  
  <p>Doesn't work...</p>
  
  <p>Also doing the same but having image as a seperate entity with it's own ID and setting reference on the parent class doesn't work?</p>