Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 29th, 2012  |  syntax: None  |  size: 0.51 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Objectify app engine - querying embedded entities using a list of values
  2. public class Customer {
  3.     @Id private String email;
  4.     @Embedded private Account Account = new Account(); // note embedded annotation
  5. }
  6.        
  7. public class Account {
  8.    private String number;  //example: 1234
  9. }
  10.        
  11. Objectify ofy = ObjectifyService.begin();
  12. ofy.query(Customer.class).filter("account.number = ", "1234");
  13.        
  14. ofy.query(Customer.class).filter("account.number = ", myAccountNumberList);
  15.        
  16. filter("account.number IN", theList)