Enhancement 242 : ENHANCEMENT - support using objects (rather than ids) in the IN clause
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.5.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
11/03/2010
Updated 
11/03/2010
Type 
Enhancement
 
Attachments 
No attachments

At the moment in the IN clause you have to use Id values.

query.where().in("consultant.id",
IdentifiableUtils.extractIds(consultants));

(IdentifiableUtils.extractIds returns List<Object>, really
List<Integer> in my case)

I'd prefer this:

query.where().in("consultant", consultants);
 
Rob 11 Mar 23:36
Fixed in HEAD

Fixed in HEAD.

So for in() and eq() on both *ToOne and *ToMany you can put a bean or list of beans and Ebean will extract out the id values and use those.

woResponse

Upload a file