title: Realm add item to RealmList that is added to RealmObject
body: <p>I need to solve putting data to a realm database like this:</p>
  
  <p>I have an object called obtained_code;
  I have a realmList of Obtained codes in an object called Offer;
  I download obtained codes separately, and by their offer id assign them to the lists of each object. The problem is that I can't add them because when I check the size, it's always 0.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>ObtainedCodes codes = response.body();
                  for (ObtainedCode c : codes.getObtainedCodes()) {
                      Offer offer = RealmController.with(SplashActivity.this).getOffer(c.getOffer_id());
                      if (offer != null) {
                          Log.d("Size", "Offer not null");
                          realm1.beginTransaction();
                          RealmList&lt;ObtainedCode&gt; list = offer.getObtained_codes();
                          if (!list) { // if the 'list' is managed, all items in it is also managed
                              RealmList&lt;ObtainedCode&gt; managedImageList = new RealmList&lt;&gt;();
                              for (ObtainedCode item : list) {
                                  if (item) {
                                      managedImageList.add(item);
                                  } else {
                                      managedImageList.add(realm1.copyToRealm(item));
                                  }
                              }
                              list = managedImageList;
                          }
  
                          offer.setObtained_codes(obtainedCodes);
                          Log.d("Size", String.valueOf(offer.getObtained_codes().size()));
                          realm1.copyToRealmOrUpdate(offer);
                          realm1.commitTransaction();
                      }
                      offer = RealmController.with(SplashActivity.this).getOffer(c.getOffer_id());
                      Log.d("Size", String.valueOf(offer.getObtained_codes().size()));
                  }
  </code></pre>