title: Object does not save to Realm DB
body: <p>Realm initialization in OnCreate() void:</p>
  <pre><code>Realm.init(getApplicationContext());
  realm = Realm.getDefaultInstance();
  </code></pre>
  <p>Saving object to Realm DB void:</p>
  <pre><code>private void saveNote() {
      realm.executeTransaction(new Realm.Transaction() {
          @Override
          public void execute(Realm realm) {
              realm.insert(note);
          }
      });
  }
  </code></pre>
  <blockquote>
  <p>Class Note extends RealmObject.</p>
  </blockquote>
  <p>In the following code (in another activity) I try to get count of objects in DB, but I get 0:</p>
  <pre><code>private void getNotesFromRealm() {
      realm.beginTransaction();
      final RealmResults realmResults = realm.where(Note.class).findAll();
      Log.d(&quot;realm&quot;, &quot;&quot; + realmResults.size());
      realm.commitTransaction();
  }
  </code></pre>
  <blockquote>
  <p>2020-07-08 12:17:36.581 19576-19576/com.myapps.notes D/realm: 0</p>
  </blockquote>
  <p>P.S: Note class here:</p>
  <pre><code>public class Note extends RealmObject {
  private int id;
  @RealmField(name = &quot;name&quot;)
  private String name;
  private String year, month, day, hour, minute, text;
  
  public Note() {}
  
  public String getText() {
      return text;
  }
  
  public void setText(String text) {
      this.text = text;
  }
  Note(String name, String year, String month, String day, String hour, String minute) {
      this.name = name;
      this.year = year;
      this.month = month;
      this.day = day;
      this.hour = hour;
      this.minute = minute;
  }
  public String getName() {
      return name;
  }
  
  public void setName(String name) {
      this.name = name;
  }
  
  String getYear() {
      return year;
  }
  
  void setYear(String year) {
      this.year = year;
  }
  
  String getMonth() {
      return month;
  }
  
  void setMonth(String month) {
      this.month = month;
  }
  
  String getDay() {
      return day;
  }
  
  void setDay(String day) {
      this.day = day;
  }
  </code></pre>
  <p>}</p>