title: Android OrmLite - OOM error in queryForId() method
body: <p>I use OrmLite and SQLite db in my Android app. Currently I'm dealing with OOM error which happens in <code>queryForId(String arg0)</code> method.</p>
  
  <p>Stacktrace:</p>
  
  <pre><code>java.lang.RuntimeException: An error occured while executing doInBackground()
  at android.os.AsyncTask$3.done(AsyncTask.java:299)
  at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
  at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
  at java.util.concurrent.FutureTask.run(FutureTask.java:239)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
  at java.lang.Thread.run(Thread.java:841) Caused by: java.lang.OutOfMemoryError
  at android.database.CursorWindow.nativeGetString(Native Method)
  at android.database.CursorWindow.getString(CursorWindow.java:438)
  at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51)
  at com.j256.ormlite.android.AndroidDatabaseResults.getString(AndroidDatabaseResults.java:134)
  at com.j256.ormlite.field.types.StringType.resultToSqlArg(StringType.java:39)
  at com.j256.ormlite.field.BaseFieldConverter.resultToJava(BaseFieldConverter.java:24)
  at com.j256.ormlite.field.FieldType.resultToJava(FieldType.java:819)
  at com.j256.ormlite.stmt.mapped.BaseMappedQuery.mapRow(BaseMappedQuery.java:60)
  at com.j256.ormlite.android.AndroidDatabaseConnection.queryForOne(AndroidDatabaseConnection.java:196)
  at com.j256.ormlite.stmt.mapped.MappedQueryForId.execute(MappedQueryForId.java:38)
  at com.j256.ormlite.stmt.StatementExecutor.queryForId(StatementExecutor.java:85)
  at com.j256.ormlite.dao.BaseDaoImpl.queryForId(BaseDaoImpl.java:223)
  at com.myapp.db.DatabaseManager.getResponseWithId(DatabaseManager.java:123)
  at com.myapp.async.AsyncBaseProxy$ExecuteBaseProxyTask.doInBackground(AsyncBaseProxy.java:321)
  at com.myapp.async.AsyncBaseProxy$ExecuteBaseProxyTask.doInBackground(AsyncBaseProxy.java:1)
  at android.os.AsyncTask$2.call(AsyncTask.java:287)
  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
  ... 3 more
  </code></pre>
  
  <p><code>DatabaseManager.java</code></p>
  
  <pre><code>synchronized public Response getResponseWithId(String idExt) {
      Response response = null;
      try {
          response = getHelper().getResponseDao().queryForId(idExt);
      } catch (SQLException e) {
          e.printStackTrace();
      }
      return response;
  }
  </code></pre>
  
  <p>Where line number 123 is</p>
  
  <pre><code>response = getHelper().getResponseDao().queryForId(idExt);
  </code></pre>
  
  <p>I execute above method in an AsyncTask.</p>
  
  <p><code>DatabaseHelper.java</code></p>
  
  <pre><code>public Dao&lt;Response, String&gt; getResponseDao() {
      if (null == responseDao) {
          try {
              responseDao = getDao(Response.class);
          } catch (java.sql.SQLException e) {
              e.printStackTrace();
          }
      }
      return responseDao;
  }
  </code></pre>
  
  <p><code>Response.java</code></p>
  
  <pre><code>@DatabaseTable
  public class Response {
  
  @DatabaseField(id = true)
  private String id;
  @DatabaseField
  private String response;
  @DatabaseField
  private long lastTime;
  @DatabaseField
  private boolean isNeedForRefresh;
  @DatabaseField
  private int errorCode;
  @DatabaseField
  private String eTag;
  
  private boolean notModified;
  private SuccessObject success;
  
  public Response() {
  }
  
  public Response(String id) {
      this.id = id;
      this.errorCode = -1;
  }
  
  /** Getters and setters below **/
  
  }
  </code></pre>
  
  <p>Any idea how to fix this issue? What optimizations can I do?<br>
  Thanks in advance.</p>