HHH-9044 formatting, minor fixes

This commit is contained in:
Brett Meyer 2014-03-13 14:41:28 -04:00
parent 1e5444f07d
commit ac648cec15
2 changed files with 5 additions and 4 deletions

View File

@ -121,7 +121,7 @@ class StatementPreparerImpl implements StatementPreparer {
jdbcCoordinator.executeBatch();
return new StatementPreparationTemplate( sql ) {
public PreparedStatement doPrepare() throws SQLException {
return connection().prepareStatement( sql, new int[]{ 1 } );
return connection().prepareStatement( sql, autoGeneratedKeys );
}
}.prepareStatement();
}

View File

@ -119,10 +119,11 @@ public final class IdentifierGeneratorHelper {
}
}
int columnCount = 1;
try{
try {
columnCount = rs.getMetaData().getColumnCount();
}catch(Exception e){
//Oracle driver will throw NPE
}
catch (Exception e) {
// Oracle driver can throw NPE on rs.getMetaData()
}
Class clazz = type.getReturnedClass();
if (columnCount == 1) {