title: Many To Many Relationships not updating in Sqlite Extensions
body: <p>Please pardon the wall of code, but I need to set the stage....</p>
  
  <pre><code>public class Student
  {
      public string Name { get; set; }
      [PrimaryKey]
      public string Id { get; set; }
  
      [ManyToMany(typeof(StudentStaff))]        
      public List&lt;Staff&gt; Teachers { get; set; }
  
      [ManyToMany(typeof(StudentGuardian))]
      public List&lt;Guardian&gt; Guardians { get; set; }
   }
  
    public class Guardian
       {
           [PrimaryKey]
           public string Id { get; set; }
           public string Name{get;set;}       
  
           [ManyToMany(typeof(StudentGuardian))]
           public List&lt;Student&gt; Students { get; set; }
      }
  
  public class Staff
  {
      [PrimaryKey]
      public string Id { get; set; }
      public string Name { get; set; }
  
      [ManyToMany(typeof(StudentStaff))]
      public List&lt;Student&gt; Students { get; set; }
  }
  
  public class StudentStaff
  {
      [ForeignKey(typeof(Student))]
      public string StudentId { get; set; }
      [ForeignKey(typeof(Staff))]
      public string StaffId { get; set; }
  }
  
   public class StudentGuardian
      {
          [ForeignKey(typeof(Student))]
          public string StudentId { get; set; }
          [ForeignKey(typeof(Guardian))]
          public string GuardianId { get; set; }
  }
  </code></pre>
  
  <p>Given those classes how should I insert the Students, Staff and Guardians into the database while maintaining the relationships?  I should note that the server returns populated Student records, so that is my starting point.</p>
  
  <p>I tried <code>conn.InsertOrReplaceWithChidlren(student);</code>...that inserted the student, the studentstaff and the studentguardian records but not the actual staff or guardian.
  I tried 
  <code>conn.InsertOrReplaceWithChildren(student);</code>
  <code>conn.InsertOrReplaceWithChildren(student.Teachers);</code>
  <code>conn.InsertOrReplaceWithChildren(student.Guardians);</code>
  Oddly that ended up with staff, guardian and teachers inserted but neither of the intersection tables had any data...</p>
  
  <p>--Update---
  I just tried
  <code>conn.InsertOrReplaceWithChildren(student.Teachers);</code>
  <code>conn.InsertOrReplaceWithChildren(student.Guardians);</code>
  <code>conn.InsertOrReplaceWithChildren(student);</code>
  And it worked perfectly...the question is why?  Why does a many to many seem to be dependent on operation order?</p>