ARTEMIS-930 Return the ID field on createFile statement
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/0bcf003a Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/0bcf003a Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/0bcf003a Branch: refs/heads/master Commit: 0bcf003a870780136854ec2f2f238a2fb37501f0 Parents: 9fb28e5 Author: Martyn Taylor <[email protected]> Authored: Fri Jan 20 12:13:24 2017 +0000 Committer: Andy Taylor <[email protected]> Committed: Fri Jan 20 12:44:22 2017 +0000 ---------------------------------------------------------------------- .../artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0bcf003a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java ---------------------------------------------------------------------- diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java index f9f206a..97c3d13 100644 --- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java +++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java @@ -69,7 +69,7 @@ public class JDBCSequentialFileFactoryDriver extends AbstractJDBCDriver { @Override protected void prepareStatements() throws SQLException { 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.copyFileRecord = connection.prepareStatement(sqlProvider.getCopyFileRecordByIdSQL()); this.renameFile = connection.prepareStatement(sqlProvider.getUpdateFileNameByIdSQL());
