Bug 415 : Using PagingList with RawSql not working ... not using raw sql statement
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.8.1
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
29/07/2012
Updated 
29/07/2012
Type 
Bug
 
Attachments 
No attachments
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();
 
Rob 29 Jul 08:03
So the query above

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.

Rob 29 Jul 08:07
Fixed in HEAD

Fixed in HEAD.

woResponse

Upload a file