title: Android Room Database: How to handle Arraylist in an Entity?
body: <p>I just implemented Room for offline data saving. But in an Entity class, I am getting the following error:</p>
  <pre><code>Error:(27, 30) error: Cannot figure out how to save this field into database. You can consider adding a type converter for it.
  </code></pre>
  <p>And the class is as following:</p>
  <pre><code>@Entity(tableName = &quot;firstPageData&quot;)
  public class MainActivityData {
  
      @PrimaryKey
      private String userId;
  
      @ColumnInfo(name = &quot;item1_id&quot;)
      private String itemOneId;
  
      @ColumnInfo(name = &quot;item2_id&quot;)
      private String itemTwoId;
  
      // THIS IS CAUSING THE ERROR... BASICALLY IT ISN'T READING ARRAYS
      @ColumnInfo(name = &quot;mylist_array&quot;)
      private ArrayList&lt;MyListItems&gt; myListItems;
  
      public String getUserId() {
          return userId;
      }
  
      public void setUserId(String userId) {
          this.userId = userId;
      }
  
      public ArrayList&lt;MyListItems&gt; getMyListItems() {
          return myListItems;
      }
  
      public void setCheckListItems(ArrayList&lt;MyListItems&gt; myListItems) {
          this.myListItems = myListItems;
      }
  
  }
  </code></pre>
  <p>So basically I want to save the ArrayList in the database but I was not able to find anything relevant to it. Can you guide me regarding how to save an Array using Room?</p>
  <p>NOTE: MyListItems Pojo class contains 2 Strings (as of now)</p>
  <p>Thanks in advance.</p>