Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2011-09-06 20:08:50 +0000
committerRyan D. Brooks2011-09-06 20:08:50 +0000
commit93ec4cfef8e23294961da38ff290b1f27d891352 (patch)
treea5887f1af5abc53ae6e58b1307dca7eea63bf4ec
parent7d7b30d313ace6c148d6914941862c724497e2fc (diff)
downloadorg.eclipse.osee-93ec4cfef8e23294961da38ff290b1f27d891352.tar.gz
org.eclipse.osee-93ec4cfef8e23294961da38ff290b1f27d891352.tar.xz
org.eclipse.osee-93ec4cfef8e23294961da38ff290b1f27d891352.zip
bug[ats_0MNHP]: Export gamma join does not work on H2 database
-rw-r--r--plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/exchange/ExchangeDb.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/exchange/ExchangeDb.java b/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/exchange/ExchangeDb.java
index 89faee1746c..b3e734f9a42 100644
--- a/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/exchange/ExchangeDb.java
+++ b/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/exchange/ExchangeDb.java
@@ -229,19 +229,19 @@ public final class ExchangeDb {
int gammaJoinId = new Random().nextInt();
StringBuilder sql =
new StringBuilder(
- "INSERT INTO osee_join_id (id, query_id) SELECT DISTINCT(gamma_id), ? FROM osee_join_export_import jex, osee_txs txs WHERE jex.query_id=? AND jex.id1 = txs.branch_id");
- bindList.add(gammaJoinId);
+ "INSERT INTO osee_join_id (id, query_id) SELECT DISTINCT(gamma_id), %s FROM osee_join_export_import jex, osee_txs txs WHERE jex.query_id=? AND jex.id1 = txs.branch_id");
bindList.add(exportJoinId);
addMaxMinFilter(sql, bindList, options);
- sql.append(" UNION SELECT DISTINCT(gamma_id), ? FROM osee_join_export_import jex, osee_txs_archived txs WHERE jex.query_id=? AND jex.id1 = txs.branch_id");
- bindList.add(gammaJoinId);
+ sql.append(" UNION SELECT DISTINCT(gamma_id), %s FROM osee_join_export_import jex, osee_txs_archived txs WHERE jex.query_id=? AND jex.id1 = txs.branch_id");
bindList.add(exportJoinId);
addMaxMinFilter(sql, bindList, options);
IOseeDatabaseService databaseService = services.getDatabaseService();
Object[] bindData = bindList.toArray(new Object[bindList.size()]);
- System.out.println(databaseService.runPreparedUpdate(sql.toString(), bindData));
+
+ String insert = String.format(sql.toString(), gammaJoinId, gammaJoinId);
+ System.out.println(databaseService.runPreparedUpdate(insert, bindData));
return gammaJoinId;
}

Back to the top