我想提出这个问题:
SELECT * FROM table_one INNER JOIN table_two ON
table_one.column_foreign_id = table_two.id WHERE table_two.column_one
<= table_two.column_two AND table_one.column_one = [param];
我试过了:
QueryBuilder<TableTwo, Integer> tableTwoQb = getTableTwoDao().queryBuilder();
tableTwoQb.selectColumns(TableTwo.COLUMN_ONE, TableTwo.COLUMN_TWO);
QueryBuilder<TableOne, Integer> tableOneQb = getTableOne().queryBuilder();
SelectArg columnOneSelectArg = new SelectArg();
tableOneQb.where().eq(TableOne.COLUMN_ONE, columnOneSelectArg);
tableOneQb.join(tableTwoQb);
但我无法在WHERE
中的两列之间设置table_two
。
我做错了什么?
答案 0 :(得分:0)
我认为你正在努力实现的目标
tableOneQb.where().le(columnOneSelectArg, columnTwoSelectArg).and().eq(columnOneSelectArg, "something");
le is&lt; =
如果没有帮助,请尝试查看here。