title: Problems saving Collection using ORMLite on Android
body: <p>I have two class:</p>
  
  <pre><code>public class Questionnaire {
  
      @DatabaseField(generatedId=true, useGetSet=true)
      private Long id;
  
      @DatabaseField
      private int type;
  
      @DatabaseField
      private String title;
  
      @DatabaseField
      private String description;
  
  
      @ForeignCollectionField(eager = true)   
      private Collection&lt;Question&gt; questions; 
  // Get and Set omitted
  </code></pre>
  
  <p>and</p>
  
  <pre><code>  public class Question {
  
          @DatabaseField(generatedId=true, useGetSet=true)
          private Long id;
  
          @DatabaseField
          private int type;
  
          @DatabaseField
          private String description;
  
  
          @DatabaseField(foreign = true, foreignAutoRefresh= true)
          private Questionnaire questionario;
  //get and set ommited
  </code></pre>
  
  <p>When I save a Questionnaire with a List of Questions. The objects are persisted, but I lose  the relationship.</p>
  
  <p>I save in this way:</p>
  
  <pre><code>ForeignCollection&lt;Question&gt; questions =
      getDao(Questionnaire.class).getEmptyForeignCollection("questions");
  
  for(Question question : DataUtil.getAllQuestions()) {
      questions.add(question);
  }
  
  Questionnaire questionnarie = new Questionnaire();
  questionnarie.setQuestions(questions);
  questionnarie.setTitle("Normal");
  questionnarie.setDescription("Questionário normal");
  getDao(Questionnaire.class).createOrUpdate(questionarie);
  </code></pre>
  
  <p>When I retrieved this register from database, a <code>Question</code> data doesn't have a reference for <code>Questionnaire</code>, and my <code>Questionnaire</code> doesn't have question list filled.</p>
  
  <p>Any help will be appreciated.</p>