title: Auto increment ID Insert Data ORMLITE
body: <p>I'm new to Android and I have problem with ORMLITE.</p>
  
  <p>For example let's say I have this table:</p>
  
  <pre><code>@DatabaseTable(tableName = "accounts")
  public class Account {
  
      @DatabaseField(id = true)
      private int id;
  
      @DatabaseField(canBeNull = false)
      private String name;
      …
  </code></pre>
  
  <p>and I want to add new data into my table <strong>without setting id</strong>. </p>
  
  <p>I tried this way:</p>
  
  <pre><code>@DatabaseTable(tableName = "accounts")
  public class Account {
  
  @DatabaseField(generatedId = true,allowGeneratedIdInsert=true)
  private int id;
  
  @DatabaseField(canBeNull = false)
  private String name;
  …
  
  
  
  &gt; Account acc = new Account();
  &gt; 
  &gt; acc.setName("Example");
  &gt; 
  &gt; AccountDao.createOrupdate(acc);
  </code></pre>
  
  <p>Here I can't insert acc into my database because acc id is zero. I want to generate id. Can I use autoincrement? </p>