RawSql rawSql = RawSqlBuilder .parse("select r.id, r.name from o_customer r ") .columnMapping("r.id", "id") .columnMapping("r.name", "name") .create(); Query<Customer> query = Ebean.find(Customer.class); query.setRawSql(rawSql); PagingList<Customer> pagingList = query.findPagingList(10); Page<Customer> page = pagingList.getPage(0); List<Customer> list = page.getList();
Does not using the supplied rawSql but generates it.
The reason is that PagingList copies the original query and the bug is that the raw sql part is not being copied.
Fixed in HEAD.