mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
No effective change - add test for explicit deleted = true property use
This commit is contained in:
@@ -43,6 +43,27 @@ public class TestSoftDeleteBasic extends BaseTestCase {
|
||||
assertThat(findInclude).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFindSoftDeleted() {
|
||||
|
||||
EBasicSoftDelete bean = new EBasicSoftDelete();
|
||||
bean.setName("softDelFetch");
|
||||
Ebean.save(bean);
|
||||
|
||||
Ebean.delete(bean);
|
||||
|
||||
Query<EBasicSoftDelete> query = Ebean.find(EBasicSoftDelete.class)
|
||||
.setIncludeSoftDeletes()
|
||||
.where()
|
||||
.eq("deleted", true)
|
||||
.eq("name", "softDelFetch")
|
||||
.query();
|
||||
|
||||
List<EBasicSoftDelete> list = query.findList();
|
||||
assertThat(query.getGeneratedSql()).contains("deleted = ?");
|
||||
assertThat(list).hasSize(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeleteById_and_findRowCount() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user