HHH-10352 : Fix unit test to work for 5.0

This commit is contained in:
Gail Badner 2016-06-13 17:15:38 -07:00
parent f601ed7662
commit dc0f99c4f4
2 changed files with 4 additions and 5 deletions

2
.gitignore vendored
View File

@ -12,7 +12,7 @@
*/build */build
testdb testdb
lib lib
if
# IntelliJ specific files/directories # IntelliJ specific files/directories
out out
.idea .idea

View File

@ -20,7 +20,6 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.nio.file.Files; import java.nio.file.Files;
import java.util.EnumSet;
import java.util.List; import java.util.List;
import org.hibernate.boot.MetadataSources; import org.hibernate.boot.MetadataSources;
@ -28,7 +27,7 @@ import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.boot.spi.MetadataImplementor; import org.hibernate.boot.spi.MetadataImplementor;
import org.hibernate.tool.hbm2ddl.SchemaExport; import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.hibernate.tool.schema.TargetType; import org.hibernate.tool.hbm2ddl.Target;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
@ -116,11 +115,11 @@ public class JoinedInheritanceForeignKeyTest extends BaseUnitTestCase {
} }
metadata = (MetadataImplementor) metadataSources.buildMetadata(); metadata = (MetadataImplementor) metadataSources.buildMetadata();
metadata.validate(); metadata.validate();
new SchemaExport() new SchemaExport( metadata )
.setHaltOnError( true ) .setHaltOnError( true )
.setOutputFile( output.getAbsolutePath() ) .setOutputFile( output.getAbsolutePath() )
.setFormat( false ) .setFormat( false )
.create( EnumSet.of( TargetType.SCRIPT ), metadata ); .create( Target.SCRIPT );
} }
@Entity(name = "PersonRole") @Entity(name = "PersonRole")