title: Storing List of objects using DataType.SERIALIZABLE in ormlite android
body: <p>How to save an ArrayList using ORMlite in android my model is as follows</p>
  
  <pre><code>class Model{
      @DatabaseField
      public String type = "";
  
      @DatabaseField
      public String name = "";
  
      @DatabaseField
      public Date dateTime = null;
  
      @DatabaseField
      ArrayList&lt;Item&gt; items = null;
  }
  </code></pre>
  
  <p>And Item class has</p>
  
  <pre><code>class Item{
       @DatabaseField
       String itemName;
       ...
  }
  </code></pre>
  
  <p>I am getting the following exception : </p>
  
  <pre><code>java.sql.SQLException: ORMLite can't store unknown class class
        java.util.ArrayList for field 'items'.   Serializable fields must specify
        dataType=DataType.SERIALIZABLE
  </code></pre>
  
  <p>But when i specify my field as</p>
  
  <pre><code>@DatabaseField(dataType = DataType.SERIALIZABLE)
  ArrayList&lt;Item&gt; items = null;
  </code></pre>
  
  <p>The compiler gives a error called field cannot be resolved please help me with this.</p>