title: Auto delete nested objects in ORMLite
body: <p>I have these to classes:</p>
  
  <pre><code>public class Station {
       @DatabaseField(foreign = true, foreignAutoCreate = true)
       private OpeningTimes openingTimes;
  }
  
  public class OpeningTimes {
       @DatabaseField(generatedId = true)
       int _id;
  }
  </code></pre>
  
  <p>Now OpeningTimes row is auto created, when I call createOrUpdate method on StationDao. That's great!</p>
  
  <p>I would be also thankful, if I could delete Station object and its nested object OpeningTimes automatically.</p>
  
  <p>Now I have to do it this way in Station class and it seems quite confusing. Is there any more elegant way?</p>
  
  <pre><code>public void deleteFromDb(DatabaseHelper dbHelper) {
      try {
          openingTimes.deleteFromDb(dbHelper);
          dbHelper.getStationDao().delete(this);
      } catch (SQLException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p><strong>EDIT:</strong>
  I have been trying also this, but with SQL Statement errors</p>
  
  <pre><code>@DatabaseField(foreign = true, foreignAutoCreate = true, columnDefinition="INTEGER, FOREIGN KEY(`openingTimes_id`) REFERENCES openingtimes(`_id`)")
  </code></pre>