I am trying to query a table as follows
select * from client c
where EXISTS (select * from visit v where c._id = v.client_id)
Can i do thi
Yes you can. Where.exists() has been supported my ORMLite for some time. Here are the [meager] docs:
http://ormlite.com/docs/exists
You would do something like the following:
QueryBuilder visitQb = visitDao.queryBuilder();
visitQb.where().eq(Visit.CLIENT_ID_FIELD, client.getId());
QueryBuilder clientQb = clientDao.queryBuilder();
clientQb.where().exists(visitQb);
List results = clientQb.query();