예제 #1
0
 @Test
 public void References() {
   for (User u : users) {
     if (u.getFriend() != null) {
       assertQuery(user.friend().eq(u.getFriend()), u);
       where(user.friend().ne(u.getFriend())).list();
     }
   }
 }
예제 #2
0
 @Test
 public void List_Keys() {
   User u =
       where(user.firstName.eq("Jaakko")).list(user.firstName, user.mainAddress().street).get(0);
   assertEquals("Jaakko", u.getFirstName());
   assertNull(u.getLastName());
   assertEquals("Aakatu", u.getMainAddress().street);
   assertNull(u.getMainAddress().postCode);
 }
예제 #3
0
 @Test
 public void LongPath() {
   assertEquals(2, query().where(user.mainAddress().city().name.eq("Helsinki")).count());
   assertEquals(2, query().where(user.mainAddress().city().name.eq("Tampere")).count());
 }