Bug 286 : where().eq("customer", null) ... fails with invalid SQL ... where t.null is null
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.6.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
21/04/2010
Updated 
21/04/2010
Type 
Bug
 
Attachments 
No attachments

Test case: (from Rien) ...

Ebean.find(Order.class)
  .where().eq("customer", null)
  .findList();
 
Rob 21 Apr 13:07
The issue...

The issue here is actually with the NullExpression object.

For the case of assoc one properties like "customer" ... the expression objects like isNull() eq(), in() etc ... need to translate "customer" into "customer.id" and use the id of the bean.

The isNull() expression is not doing this.

Rob 22 Apr 00:01
Fixed in HEAD.

See TestQueryNullAssocOne.

Fixed in HEAD.

woResponse

Upload a file