Skip to content

Commit

Permalink
Merge branch '3.7' of https://github.com/JumpMind/symmetric-ds.git in…
Browse files Browse the repository at this point in the history
…to 3.7
  • Loading branch information
erilong committed Mar 1, 2016
2 parents 4a72896 + 4b6477f commit fc8e465
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -32,7 +32,6 @@
import org.jumpmind.db.model.Table;
import org.jumpmind.db.platform.DatabaseInfo;
import org.jumpmind.db.platform.IDatabasePlatform;
import org.jumpmind.db.platform.db2.Db2DatabasePlatform;
import org.jumpmind.db.sql.DmlStatement;
import org.jumpmind.db.sql.DmlStatement.DmlType;
import org.jumpmind.db.sql.ISqlReadCursor;
Expand Down Expand Up @@ -275,7 +274,7 @@ protected String buildOrderBy(Table table, IDatabasePlatform platform) {
StringBuilder orderByClause = new StringBuilder("ORDER BY ");
for (Column pkColumn : table.getPrimaryKeyColumns()) {
String columnName = new StringBuilder(quote).append(pkColumn.getName()).append(quote).toString();
if (platform instanceof Db2DatabasePlatform && pkColumn.isOfTextType() ) {
if (platform.getName().startsWith("db2") && pkColumn.isOfTextType() ) {
orderByClause.append("TRANSLATE ")
.append("(").append(columnName).append(", 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',")
.append("'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')");
Expand Down

0 comments on commit fc8e465

Please sign in to comment.