Bug 297 : RawSql with FetchConfig() and filterMany() giving incorrect SQL
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.7.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
20/05/2010
Updated 
20/05/2010
Type 
Bug
 
Attachments 
No attachments

Specifically the expressions in the filterMany are not being evaluated.

Issue raised by Daryl.

I have reproduced it with:

List<OrderAggregate> list2 = Ebean.find(OrderAggregate.class)
            .setRawSql(rawSql)       
            .fetch("order", new FetchConfig().query())
            .fetch("order.details", new FetchConfig().query())
            .where().gt("order.id", 2)
            .having().gt("totalAmount", 10)
            .filterMany("order.details").gt("unitPrice", 2d)
            .findList();

results in:

...
where od.id > 0 and o.id = ?
and order.details.unitPrice > ?
...

 
Rob 20 May 04:31
Fixed in HEAD

Ok, fixed in HEAD.

woResponse

Upload a file