mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#996 Add findOne() and findOneOrEmpty()
This commit is contained in:
@@ -49,7 +49,7 @@ public class TestQueryWithCache extends BaseTestCase {
|
||||
Country nz3 = Ebean.find(Country.class, "NZ");
|
||||
|
||||
Country nz4 = Ebean.find(Country.class).setId("NZ").setAutoTune(false).setUseCache(false)
|
||||
.findUnique();
|
||||
.findOne();
|
||||
|
||||
assertTrue(nz2 == nz2b);
|
||||
assertTrue(nz2 == nz3);
|
||||
@@ -65,7 +65,7 @@ public class TestQueryWithCache extends BaseTestCase {
|
||||
Ebean.find(Country.class, "NZ");
|
||||
|
||||
Query<Country> query = Ebean.find(Country.class).setId("NZ").setUseCache(false);
|
||||
query.findUnique();
|
||||
query.findOne();
|
||||
|
||||
assertThat(query.getGeneratedSql()).isNotNull();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user