title: Realm invalid type
body: <p>I tried to use Realm to make a wish list in my android app. I put data from adapter to SinglePost Activity and I try to put them in realm and display in another activity.
  In SinglePost Activity I got this error!
  Here is my Activity</p>
  
  <pre><code>public class SinglePost extends AppCompatActivity {
      String id, image, url, content, video;
      Realm realm;
      public Adapter adapter;
      ModelPost postInfo;
      private String postId;
      public static final String Key_Post = "ID";
  ...
          id = getIntent().getStringExtra("ID");
          postTitle.setText(getIntent().getStringExtra("Title"));
          postExpert.setText(getIntent().getStringExtra("Expert"));
          image = getIntent().getStringExtra("Image");
  
          postId = getIntent().getStringExtra("ID");
  
          realm = Realm.getDefaultInstance();
          RealmResults&lt;ModelPost&gt; result = realm.where(ModelPost.class).equalTo(Key_Post, postId).findAll();
          if (result.size() != 0) {
              bookmark.setImageResource(R.drawable.ic_bookmark_black_24dp);
          } else {
              bookmark.setImageResource(R.drawable.ic_bookmark_border_black_24dp);
          }
          Bookmark();
      }
  
      private void Bookmark() {
  
          bookmark.setOnClickListener(v -&gt; realm.executeTransaction(realm -&gt; {
              RealmResults&lt;ModelPost&gt; results = realm.where(ModelPost.class).equalTo(Key_Post, id).findAll();
              if (results.size() == 0) {
                  if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.N) {
                  }
                  realm.copyToRealm(postInfo);
                  bookmark.setImageResource(R.drawable.ic_bookmark_black_24dp);
                  Toast.makeText(getApplicationContext(), "Added", Toast.LENGTH_SHORT).show();
              } else {
                  results.get(0).deleteFromRealm();
                  bookmark.setImageResource(R.drawable.ic_bookmark_border_black_24dp);
                  Toast.makeText(getApplicationContext(), "Removed", Toast.LENGTH_SHORT).show();
  
              }
          }));
      }
  
  </code></pre>
  
  <p>Model:</p>
  
  <p><a href="https://i.stack.imgur.com/R1dpp.jpg" rel="nofollow noreferrer">Model Class</a></p>
  
  <p>Config:</p>
  
  <pre><code>public class G extends Application
  {
      @Override
      public void onCreate()
      {
          super.onCreate();
          Realm.init(getApplicationContext());
          RealmConfiguration configuration = new RealmConfiguration.Builder()
                  .name(Realm.DEFAULT_REALM_NAME)
                  .schemaVersion(0)
                  .deleteRealmIfMigrationNeeded()
                  .build();
          Realm.setDefaultConfiguration(configuration);
      }
  }
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Invalid query: field 'ID' in class 'ModelPost' is of invalid type 'INTEGER'.
  </code></pre>