title: Realm Error: This method is only available in managed mode
body: <p>When I install my app for first time on my phone, the app crashes because of the Realm error: <code>This method is only available in managed mode</code> which I really don't understand much of</p>
  
  <p>This happends when I try to get a sorted list of <code>ListItem</code> in the class <code>Shoplist</code></p>
  
  <pre><code>public class Shoplist extends RealmObject implements Serializable {
  
  private RealmList&lt;ListItem&gt; itemList;   //ListItem extends `RealmObject`
  
  @Ignore
  private Realm realm;
  
  @PrimaryKey
  private long id;
  
  public Shoplist() {
  
      realm = Realm.getDefaultInstance();
  }
  
  public RealmList&lt;ListItem&gt; getItemList() {
      return itemList;
  }
  
   public List&lt;ListItem&gt; getItems(String listOrder) {
  
      RealmResults&lt;ListItem&gt; realmResults;
  
      switch (listOrder) {
          case PrefActivity.ASCENDING:
              realmResults = getItemList().where().findAll(); // this crashes!
              break;
  
          case PrefActivity.DESCENDING:
              realmResults = getItemList().where().findAllSorted(ListItem.TIME_STAMP, Sort.DESCENDING);
              break;
      }
  
      return realmResults;
     }
  }
  </code></pre>
  
  <p>A Shoplist object is created like this in a class called <code>RealmService</code></p>
  
  <pre><code>public Shoplist createShoplist(String title) {
  
      realm = Realm.getDefaultInstance();
      realm.beginTransaction();
      Shoplist shoplist = new Shoplist(new RealmList&lt;ListItem&gt;(), title);
      realm.copyToRealm(shoplist);
      realm.commitTransaction();
  
      return shoplist;
  
  }
  </code></pre>
  
  <p><strong>STATS:</strong> </p>
  
  <p>Realm Gradle Plugin: 2.3.1</p>
  
  <p>Gradle Plugin: 2.2.3</p>
  
  <p>Compile version: 25</p>
  
  <p>Android Studio version: 2.2.3</p>
  
  <p>Test phone: Samsung Galaxy S7</p>