CI Testing - ParentQueryTest truncate

This commit is contained in:
rob bygrave
2020-03-01 12:12:01 +13:00
parent 04c9007d22
commit fb472a0304
2 changed files with 8 additions and 6 deletions
@@ -1,6 +1,7 @@
package org.tests.rawsql.inherit;
import io.ebean.BaseTestCase;
import io.ebean.DB;
import io.ebean.Ebean;
import org.tests.inherit.ChildA;
import org.tests.inherit.ChildB;
@@ -21,10 +22,10 @@ public class ParentQueryTest extends BaseTestCase {
public void clearDb() {
Ebean.deleteAll(Ebean.find(Data.class).findList());
//@rob: this does not work as it does not clear the ManyToMany relations.
//Ebean.find(Data.class).delete();
Ebean.find(Parent.class).delete();
//Ebean.find(Data.class).delete();
DB.truncate(Parent.class);
}
@Test
public void QueryParentCollectionFetch() {
@@ -1,6 +1,7 @@
package org.tests.rawsql.inherit;
import io.ebean.BaseTestCase;
import io.ebean.DB;
import io.ebean.Ebean;
import io.ebean.FetchConfig;
import io.ebean.RawSql;
@@ -25,10 +26,10 @@ public class ParentRawSqlTest extends BaseTestCase {
public void clearDb() {
Ebean.deleteAll(Ebean.find(Data.class).findList());
//@rob: this does not work as it does not clear the ManyToMany relations.
//Ebean.find(Data.class).delete();
Ebean.find(Parent.class).delete();
//Ebean.find(Data.class).delete();
DB.truncate(Parent.class);
}
@Test
public void RawSqlParentLoad() {