Skip to content

Commit

Permalink
Upgrade to Hibernate 5.1.0.Final
Browse files Browse the repository at this point in the history
  • Loading branch information
ar committed Apr 21, 2016
1 parent d9b84a3 commit 7a68ba3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ allprojects {
apply plugin: 'maven'

group = 'org.jpos.ee'
version = '2.2.0'
version = '2.2.1-SNAPSHOT'
}

subprojects {
Expand Down
2 changes: 1 addition & 1 deletion libraries.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ext {
jposVersion = '2.0.6'
slf4jVersion = '1.7.10'
logbackVersion = '1.1.3'
hibernateVersion = '5.0.9.Final'
hibernateVersion = '5.1.0.Final'
geronimoVersion = '1.1.1'
jettyVersion = '9.2.14.v20151106'
servletApiVersion = '3.0.1'
Expand Down
16 changes: 10 additions & 6 deletions modules/dbsupport/src/main/java/org/jpos/ee/DB.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.hibernate.resource.transaction.spi.TransactionStatus;
import org.hibernate.stat.SessionStatistics;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.hibernate.tool.schema.TargetType;
import org.jpos.core.ConfigurationException;
import org.jpos.ee.support.ModuleUtils;
import org.jpos.util.Log;
Expand Down Expand Up @@ -243,15 +244,18 @@ private Properties loadProperties(String filename) throws IOException
* @param create true to actually issue the create statements
*/
public void createSchema(String outputFile, boolean create) throws HibernateException, DocumentException {
try
{
SchemaExport export = new SchemaExport(getMetadata());
if (outputFile != null)
{
try {
// SchemaExport export = new SchemaExport(getMetadata());
SchemaExport export = new SchemaExport();
EnumSet<TargetType> targetTypes = EnumSet.of(TargetType.STDOUT);
if (outputFile != null) {
export.setOutputFile(outputFile);
export.setDelimiter(";");
targetTypes.add(TargetType.SCRIPT);
}
export.create(true, create);
if (create)
targetTypes.add(TargetType.DATABASE);
export.create(targetTypes, getMetadata());
}
catch (IOException | ConfigurationException e)
{
Expand Down

0 comments on commit 7a68ba3

Please # to comment.