#996 Add findOne() and findOneOrEmpty()

This commit is contained in:
rob bygrave
2017-05-19 23:38:40 +12:00
parent c1bed9f578
commit db298a349e
20 changed files with 78 additions and 51 deletions
@@ -27,7 +27,7 @@ public class TestWhereAnnotation extends BaseTestCase {
Query<Customer> q1 = Ebean.find(Customer.class).setUseCache(false).fetch("orders").where()
.idEq(1).query();
q1.findUnique();
q1.findOne();
String s1 = q1.getGeneratedSql();
Assert.assertTrue(s1.contains("t1.order_date is not null"));
}