Guest User

Untitled

a guest
Jan 20th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. Account a = select (Account).where (Account.id.is (2)).get ();
  2. List<Account> list = select (Account.all).where (Account.id.is (2)).list ();
  3.  
  4. Account b = select (Account).filterBy (Account.id, 2).get ();
  5. Account c = select (Account).where (Account.id, is (2)).get ();
  6.  
  7. class Result {}
  8. Result d = select (Account.id, Account.name).where (Account.id, is (2)).to (Result.class).get ();
  9.  
  10. // si les fields ne connaissent pas la classe d'o� ils viennent
  11. Result e = select (id, name).from (Account).where (id, is (2)).to (Result.class).get ();
  12.  
  13. List<Account> accountsRecentlyOpenedOrUsed =
  14. select (Account).where (Account.created, lessThan (10).daysAgo)
  15. .or (Account.transactions.has (Transaction.Transaction.occurred, lessThan (10).daysAgo))
  16. .list();
  17.  
  18. Account f = select (Account).where (Account.id, GenericOperator.is ("2")).get ();
Add Comment
Please, Sign In to add comment