diff --git a/amp/WEB-INF/src/org/digijava/module/aim/action/dataimporter/util/ImportedFileUtil.java b/amp/WEB-INF/src/org/digijava/module/aim/action/dataimporter/util/ImportedFileUtil.java index 28aae6ce8f3..50f3935b9c4 100644 --- a/amp/WEB-INF/src/org/digijava/module/aim/action/dataimporter/util/ImportedFileUtil.java +++ b/amp/WEB-INF/src/org/digijava/module/aim/action/dataimporter/util/ImportedFileUtil.java @@ -40,7 +40,7 @@ public static ImportedFilesRecord saveFile(File file, String filename) throws IO String generatedHash = generateSHA256Hash(file); logger.info("Saving File hash is " + generatedHash); - String sql = "INSERT INTO imported_files_record (id, file_hash, import_status, file_name) VALUES (nextval('IMPORTED_FILES_RECORD_SEQ'), :fileHash, :importStatus, :fileName)"; + String sql = "INSERT INTO imported_files_record (id, file_hash, import_status, file_name) VALUES (nextval('IMPORTED_FILES_RECORD_SEQ'), :fileHash, :importStatus, :fileName) RETURNING id"; Query query = session.createSQLQuery(sql); query.setParameter("fileHash", generatedHash); query.setParameter("importStatus", ImportStatus.UPLOADED);