new Select("id")
.From(customer)
.where("lastName=?","John")
.execute();
错误
E/CursorWindow: Failed to read row 0, column -1 from a CursorWindow which has 1 rows, 1 columns.
主要查询(从客户中选择id,其中lastName =" John&#34 ;;)
答案 0 :(得分:0)
尝试
List<Customer> results = new Select().from(Customer.class).where("lastName=?","John").execute();
if(results.size() > 0) {
long id = results.get(0).getId();
}