ARTEMIS-930 Return the ID field on createFile statement

(cherry picked from commit 0bcf003a87)
This commit is contained in:
Martyn Taylor 2017-01-20 12:13:24 +00:00
parent 512dbee133
commit 87c7e05820
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ public class JDBCSequentialFileFactoryDriver extends AbstractJDBCDriver {
@Override @Override
protected void prepareStatements() throws SQLException { protected void prepareStatements() throws SQLException {
this.deleteFile = connection.prepareStatement(sqlProvider.getDeleteFileSQL()); this.deleteFile = connection.prepareStatement(sqlProvider.getDeleteFileSQL());
this.createFile = connection.prepareStatement(sqlProvider.getInsertFileSQL(), Statement.RETURN_GENERATED_KEYS); this.createFile = connection.prepareStatement(sqlProvider.getInsertFileSQL(), new String[] {"ID"});
this.selectFileByFileName = connection.prepareStatement(sqlProvider.getSelectFileByFileName()); this.selectFileByFileName = connection.prepareStatement(sqlProvider.getSelectFileByFileName());
this.copyFileRecord = connection.prepareStatement(sqlProvider.getCopyFileRecordByIdSQL()); this.copyFileRecord = connection.prepareStatement(sqlProvider.getCopyFileRecordByIdSQL());
this.renameFile = connection.prepareStatement(sqlProvider.getUpdateFileNameByIdSQL()); this.renameFile = connection.prepareStatement(sqlProvider.getUpdateFileNameByIdSQL());