HHH-12875 HHH-12882 : Drop tables in proper order in test setup methods

This commit is contained in:
Gail Badner 2018-08-13 23:26:37 -07:00
parent a5fa213658
commit 770ae50e8b
3 changed files with 13 additions and 12 deletions

View File

@ -53,10 +53,10 @@ public class LazyManyToManyNonUniqueIdWhereTest extends BaseCoreFunctionalTestCa
doInHibernate(
this::sessionFactory, session -> {
session.createSQLQuery( "DROP TABLE MAIN_TABLE" ).executeUpdate();
session.createSQLQuery( "DROP TABLE ASSOCIATION_TABLE" ).executeUpdate();
session.createSQLQuery( "DROP TABLE MATERIAL_RATINGS" ).executeUpdate();
session.createSQLQuery( "DROP TABLE BUILDING_RATINGS" ).executeUpdate();
session.createSQLQuery( "drop table MATERIAL_RATINGS" ).executeUpdate();
session.createSQLQuery( "drop table BUILDING_RATINGS" ).executeUpdate();
session.createSQLQuery( "drop table ASSOCIATION_TABLE" ).executeUpdate();
session.createSQLQuery( "drop table MAIN_TABLE" ).executeUpdate();
session.createSQLQuery(
"create table MAIN_TABLE( " +

View File

@ -36,10 +36,11 @@ public class LazyManyToManyNonUniqueIdNotFoundWhereTest extends BaseCoreFunction
public void setup() {
doInHibernate(
this::sessionFactory, session -> {
session.createSQLQuery( "DROP TABLE MAIN_TABLE" ).executeUpdate();
session.createSQLQuery( "DROP TABLE ASSOCIATION_TABLE" ).executeUpdate();
session.createSQLQuery( "DROP TABLE MATERIAL_RATINGS" ).executeUpdate();
session.createSQLQuery( "DROP TABLE BUILDING_RATINGS" ).executeUpdate();
session.createSQLQuery( "drop table MATERIAL_RATINGS" ).executeUpdate();
session.createSQLQuery( "drop table BUILDING_RATINGS" ).executeUpdate();
session.createSQLQuery( "drop table ASSOCIATION_TABLE" ).executeUpdate();
session.createSQLQuery( "drop table MAIN_TABLE" ).executeUpdate();
session.createSQLQuery(
"create table MAIN_TABLE( " +

View File

@ -42,10 +42,10 @@ public class LazyManyToManyNonUniqueIdWhereTest extends BaseCoreFunctionalTestCa
doInHibernate(
this::sessionFactory, session -> {
session.createSQLQuery( "DROP TABLE MAIN_TABLE" ).executeUpdate();
session.createSQLQuery( "DROP TABLE ASSOCIATION_TABLE" ).executeUpdate();
session.createSQLQuery( "DROP TABLE MATERIAL_RATINGS" ).executeUpdate();
session.createSQLQuery( "DROP TABLE BUILDING_RATINGS" ).executeUpdate();
session.createSQLQuery( "drop table MATERIAL_RATINGS" ).executeUpdate();
session.createSQLQuery( "drop table BUILDING_RATINGS" ).executeUpdate();
session.createSQLQuery( "drop table ASSOCIATION_TABLE" ).executeUpdate();
session.createSQLQuery( "drop table MAIN_TABLE" ).executeUpdate();
session.createSQLQuery(
"create table MAIN_TABLE( " +