lundi 31 août 2015

OrmLite does not bring results on where

What's wrong with this line?

genericQB.where().ne(AppConstant.SYNC_STATUS_FIELD_NAME, strSyncOK);

i'm doing a simple where not equals with ORMlite and brings 0 results no errors:

full code:

dao = DaoManager.createDao(connectionSource, clazz);
QueryBuilder qB = dao.queryBuilder();
SelectArg strSyncOK = new SelectArg(AppConstant.SYNC_OK); // ==> "OK" string
qB.where().ne(AppConstant.SYNC_STATUS_FIELD_NAME, strSyncOK);
List<T> var = dao.query(qB.prepare());

When i remove the line

qB.where().ne(AppConstant.SYNC_STATUS_FIELD_NAME, strSyncOK);

all is ok when the line is there, no results found, i checked data and all data with AppConstant.SYNC_STATUS_FIELD_NAME is null

i'm missing something?

Aucun commentaire:

Enregistrer un commentaire