title: One-To-Many relationship in ORMLite Android
body: <p>How do I implement one-many relationship in ORMLite Android?</p>
  
  <p>please find the example</p>
  
  <pre><code>public class A {
   private String name;
      @DatabaseField (foreign = true, foreignAutoRefresh = true, columnName = "A")
      private B b;
      @DatabaseField(columnName = "author")
      private String authorName;
  }
  
  public class B {
      @DatabaseField(generatedId = true, columnName = "id")
      private long id;
      @DatabaseField(columnName = "name")
      private String name;
      @ForeignCollectionField
      Collection&lt;A&gt; aees;
  }
  </code></pre>
  
  <p>B has collection of A.  I am calling <code>dao.create(b);</code></p>
  
  <p>Now i create dao of b, since b has all the data. But the table B has only created with data, A is never created.  Kindly could some one help?</p>