RawSql rawSql = RawSqlBuilder .parse("select r.id, r.name from o_customer r where r.id > :id and r.name like :name") .columnMapping("r.id", "id") .columnMapping("r.name", "name") .create(); Query<Customer> query = Ebean.find(Customer.class); query.setRawSql(rawSql); query.setParameter("name", "R%"); query.setParameter("id", 0); query.where().lt("id", 1000); List<Customer> list = query.findList();
and...
RawSql rawSql = RawSqlBuilder .unparsed("select r.id, r.name from o_customer r where r.id >= ? and r.name like ?") .columnMapping("r.id", "id") .columnMapping("r.name", "name") .create(); Query<Customer> query = Ebean.find(Customer.class); query.setRawSql(rawSql); query.setParameter(1, 1); query.setParameter(2, "R%"); List<Customer> list = query.findList();
fixed in HEAD.