title: Realm data not updated in android using copyToRealmOrUpdate method
body: <p>I'm trying to add and retrieve data using Realm, like this</p>
  
  <pre><code>RealmController realmController = RealmController.with(this).getInstance();
  
      FirstTime firstTime = new FirstTime();
      firstTime.setFirstTime(1);
      realmController.addFirstTime(firstTime);
      Timber.d("firs time %s",realmController.getFirstTime().getFirstTime());
  
  
      FirstTime firstTime1 = new FirstTime();
      firstTime1.setFirstTime(2);
      realmController.addFirstTime(firstTime1);
      Timber.d("firs time updated %s",realmController.getFirstTime().getFirstTime());
  </code></pre>
  
  <p>realmController is not null and the realmcontroller.addFirstTime() method is like this</p>
  
  <pre><code>public void addFirstTime(FirstTime firstTime){
      Timber.d("adding first time %s",firstTime.getFirstTime());
      realm.beginTransaction();
      realm.copyToRealmOrUpdate(firstTime);
      realm.commitTransaction();
  }
  </code></pre>
  
  <p>And my FirstTime class is like this</p>
  
  <pre><code>public class FirstTime extends RealmObject{
  //0 = firstime; 1 = not firstime
  @PrimaryKey
  int firstTime;
  
  public int getFirstTime() {
      return firstTime;
  }
  
  public void setFirstTime(int firstTime) {
      this.firstTime = firstTime;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>The getFirstTime() in RealController is like this</p>
  
  <pre><code>public FirstTime getFirstTime() {
  
      return realm.where(FirstTime.class).findFirst();
  }
  </code></pre>
  
  <p>So in the first code part, first Timber is giving 1, which is okay but the second Timber i.e</p>
  
  <pre><code>Timber.d("firs time updated %s",realmController.getFirstTime().getFirstTime());
  </code></pre>
  
  <p>should give me the updated value that is 2 but it is giving me 1, the old value.</p>