title: Realm order of insert or update
body: <p>I am using <strong>Realm</strong> in order to persist objects for an <strong>Android</strong> project.
  The problem is that I have a composition of many classes and inner fields as classes and lists of them.
  Something like </p>
  
  <pre><code>class A extends RealmObject{
     @PrimaryKey long id;
     B b;
  } 
  
  class B extends RealmObject{
     @PrimaryKey long id;
     RealmList&lt;C&gt; cList;
  }
  
  class C extends RealmObject{
    @PrimaryKey long id;
    Date date;
    String value;
    //other fields....
  }
  </code></pre>
  
  <p>The problem is that I want to update some of the fields of <strong>C</strong> or insert new <strong>C</strong> in the <strong>RealmList of B</strong>. In <strong>what order</strong> should I do that in order to preserve the relations? Can anyone give a real example? Also, Realm doesn't support auto incrementation for IDs and currently I am setting them to currentTimeInMillis when initiated. Is there a better alternative to that?</p>