I need to write following Query in ORMLite
SELECT * FROM T1 t1, T2 t2 where t1.id = t2.id AND t1.type='abc' AND (t1.title = 'XYZ' OR t2.description = 'xyz');
However So Far I have been able to write following code:
QueryBuilder<T1, Integer> t1QB = getT1Dao().queryBuilder();
QueryBuilder<T2, Integer> t2QB = getT2Dao().queryBuilder();
t1QB.join(t2QB);
Where<T1, Integer> where = t1QB.where();
where.eq("Type", "abc");
where.and().or(
where.ne("title", "XYZ"),
where.ne("description", "xyz"),
);
but this throws exception that column not found "description" in T1. And also T1 has T2 object in it and autoRefresh is true in @DatabaseField annotation.
Is there is any way to do this with above method or I have to write custom Query