Logger.info("count2: %1$s", Account.count());
}
@Test
public void testDistinct() {
Account a1 = new Account("loginxyz", "a@a.a");
a1.save();
Account a2 = new Account("loginabc", "a@a.x");
a2.save();
Set<?> set = Account._distinct("email");
assertSame(2, set.size());
Account a3 = new Account("login123", "a@a.b", "SG");
a3.save();
Account a4 = new Account("login456", "a@a.c", "AU");
a4.save();
set = Account.q("region", "AU").distinct("email");
assertSame(3, set.size());
assertTrue(set.contains("a@a.a"));
assertTrue(set.contains("a@a.x"));
assertTrue(set.contains("a@a.c"));