summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntje Fuhrmann2012-09-18 05:02:02 (EDT)
committerStephan Born2012-09-18 05:02:02 (EDT)
commit75abc33e5f8815e8df9b3ffd92ab9426edfa8fc5 (patch)
tree5422381a293fc4c5f38d10e6bdd40141bdd0ea1d
parenta2d809b0359e952adc74b66e19b715ce4e76413e (diff)
downloadorg.eclipse.stardust.engine-75abc33e5f8815e8df9b3ffd92ab9426edfa8fc5.zip
org.eclipse.stardust.engine-75abc33e5f8815e8df9b3ffd92ab9426edfa8fc5.tar.gz
org.eclipse.stardust.engine-75abc33e5f8815e8df9b3ffd92ab9426edfa8fc5.tar.bz2
Jira-ID: CRNT-25958
Cannot deploy model on MSSQL 2008 git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/engine@59308 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/persistence/jdbc/DDLManager.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/persistence/jdbc/DDLManager.java b/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/persistence/jdbc/DDLManager.java
index 54a16b3..7af72d9 100644
--- a/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/persistence/jdbc/DDLManager.java
+++ b/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/persistence/jdbc/DDLManager.java
@@ -836,6 +836,20 @@ public class DDLManager
+ "VALUES (" + dbDescriptor.getNextValForSeqString(schemaName, "partition_seq") +
", 'default', NULL)");
ps.println(statementDelimiter);
+ if (session.isUsingLockTables()
+ && TypeDescriptor.get(AuditTrailPartitionBean.class)
+ .isDistinctLockTableName())
+ {
+ columns = new ArrayList();
+ columns.add(AuditTrailPartitionBean.FIELD__OID);
+ ps.println(
+ "INSERT INTO " + getQualifiedName(schemaName, dbDescriptor.quoteIdentifier(AuditTrailPartitionBean.LOCK_TABLE_NAME))
+ + buildColumnsFragment(dbDescriptor, columns)
+ + "SELECT " + "p.oid "
+ + "FROM " + dbDescriptor.quoteIdentifier(AuditTrailPartitionBean.TABLE_NAME) + " p "
+ + "WHERE p.id = 'default'");
+ ps.println(statementDelimiter);
+ }
columns = new ArrayList();
columns.add(UserDomainBean.FIELD__OID);
@@ -928,6 +942,20 @@ public class DDLManager
+ buildColumnsFragment(dbDescriptor, columns)
+ "VALUES ('default', NULL)");
ps.println(statementDelimiter);
+ if (session.isUsingLockTables()
+ && TypeDescriptor.get(AuditTrailPartitionBean.class)
+ .isDistinctLockTableName())
+ {
+ columns = new ArrayList();
+ columns.add(AuditTrailPartitionBean.FIELD__OID);
+ ps.println(
+ "INSERT INTO " + getQualifiedName(schemaName, dbDescriptor.quoteIdentifier(AuditTrailPartitionBean.LOCK_TABLE_NAME))
+ + buildColumnsFragment(dbDescriptor, columns)
+ + "SELECT " + "p.oid "
+ + "FROM " + dbDescriptor.quoteIdentifier(AuditTrailPartitionBean.TABLE_NAME) + " p "
+ + "WHERE p.id = 'default'");
+ ps.println(statementDelimiter);
+ }
columns = new ArrayList();
columns.add(UserDomainBean.FIELD__ID);
@@ -1020,6 +1048,18 @@ public class DDLManager
+ buildColumnsFragment(dbDescriptor, columns)
+ "VALUES (1, 'default', NULL)");
ps.println(statementDelimiter);
+ if (session.isUsingLockTables()
+ && TypeDescriptor.get(AuditTrailPartitionBean.class)
+ .isDistinctLockTableName())
+ {
+ columns = new ArrayList();
+ columns.add(AuditTrailPartitionBean.FIELD__OID);
+ ps.println(
+ "INSERT INTO " + getQualifiedName(schemaName, dbDescriptor.quoteIdentifier(AuditTrailPartitionBean.LOCK_TABLE_NAME))
+ + buildColumnsFragment(dbDescriptor, columns)
+ + "VALUES (1)");
+ ps.println(statementDelimiter);
+ }
columns = new ArrayList();
columns.add(UserDomainBean.FIELD__OID);