diff --git a/ebean-api/src/main/java/io/ebean/config/dbplatform/db2/DB2ForIPlatform.java b/ebean-api/src/main/java/io/ebean/config/dbplatform/db2/DB2ForIPlatform.java index 4e3db3ca5..fa6028858 100644 --- a/ebean-api/src/main/java/io/ebean/config/dbplatform/db2/DB2ForIPlatform.java +++ b/ebean-api/src/main/java/io/ebean/config/dbplatform/db2/DB2ForIPlatform.java @@ -1,6 +1,5 @@ package io.ebean.config.dbplatform.db2; -import io.ebean.annotation.PersistBatch; import io.ebean.annotation.Platform; import io.ebean.config.dbplatform.DbPlatformType; import io.ebean.config.dbplatform.DbType; @@ -10,6 +9,7 @@ import java.sql.Types; /** * DB2 specific platform for i Series. + * * @author Cédric Sougné */ public class DB2ForIPlatform extends BaseDB2Platform { @@ -18,23 +18,22 @@ public class DB2ForIPlatform extends BaseDB2Platform { super(); this.platform = Platform.DB2FORI; // Note: IBM i from 7.1 allow up to to 128 - // TODO: Check if we need to introduce older platform (DB2ForI_6 ? but older documentation is not anymore published on ibm.com), + // TODO: Check if we need to introduce older platform (DB2ForI_6 ? but older + // documentation is not anymore published on ibm.com), this.maxTableNameLength = 128; this.maxConstraintNameLength = 128; this.dbIdentity.setSupportsIdentity(true); - this.exceptionTranslator = - new SqlErrorCodes() - .addAcquireLock("57033") // key -913 + this.exceptionTranslator = new SqlErrorCodes().addAcquireLock("57033") // key -913 .addDuplicateKey("23505") // -803 // .addDataIntegrity("-407","-530","-531","-532","-543","-544","-545","-603","-667") - // we need SQLState, not code: https://www.ibm.com/support/knowledgecenter/en/SSEPEK_10.0.0/codes/src/tpc/db2z_n.html - .addDataIntegrity("23502","23503","23504","23507","23511","23512","23513","42917","23515") + // we need SQLState, not code: + // https://www.ibm.com/support/knowledgecenter/en/SSEPEK_10.0.0/codes/src/tpc/db2z_n.html + .addDataIntegrity("23502", "23503", "23504", "23507", "23511", "23512", "23513", "42917", "23515") .build(); booleanDbType = Types.SMALLINT; dbTypeMap.put(DbType.BOOLEAN, new DbPlatformType("smallint default 0")); } - -} \ No newline at end of file +} diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/core/DatabasePlatformFactory.java b/ebean-core/src/main/java/io/ebeaninternal/server/core/DatabasePlatformFactory.java index 8a89db102..ad03fd45f 100644 --- a/ebean-core/src/main/java/io/ebeaninternal/server/core/DatabasePlatformFactory.java +++ b/ebean-core/src/main/java/io/ebeaninternal/server/core/DatabasePlatformFactory.java @@ -106,7 +106,7 @@ public class DatabasePlatformFactory { return new SqlAnywherePlatform(); } if (dbName.equals("db2")) { - throw new IllegalArgumentException("Please choose the more specific db2luw/db2zos/db2fori platform. Refer to issue #xxxx for details"); + throw new IllegalArgumentException("Please choose the more specific db2luw/db2zos/db2fori platform. Refer to issue #2514 for details"); } if (dbName.equals("db2legacy")) { return new DB2LegacyPlatform(); @@ -174,7 +174,7 @@ public class DatabasePlatformFactory { } else if (dbProductName.contains("sqlite")) { return new SQLitePlatform(); } else if (dbProductName.contains("db2")) { - throw new IllegalArgumentException("For DB2 please explicitly choose either db2legacy/db2luw/db2zos/db2fori platform. Refer to issue #xxxx for details"); + throw new IllegalArgumentException("For DB2 please explicitly choose either db2legacy/db2luw/db2zos/db2fori platform. Refer to issue #2514 for details"); } else if (dbProductName.contains("sql anywhere")) { return new SqlAnywherePlatform(); } else if (dbProductName.contains("hdb")) { diff --git a/ebean-ddl-generator/src/main/java/io/ebeaninternal/dbmigration/DefaultDbMigration.java b/ebean-ddl-generator/src/main/java/io/ebeaninternal/dbmigration/DefaultDbMigration.java index f8c4855a8..cdfa5a528 100644 --- a/ebean-ddl-generator/src/main/java/io/ebeaninternal/dbmigration/DefaultDbMigration.java +++ b/ebean-ddl-generator/src/main/java/io/ebeaninternal/dbmigration/DefaultDbMigration.java @@ -834,7 +834,7 @@ public class DefaultDbMigration implements DbMigration { case SQLSERVER: throw new IllegalArgumentException("Please choose the more specific SQLSERVER16 or SQLSERVER17 platform. Refer to issue #1340 for details"); case DB2: - logger.warn("Using DB2LegacyPlatform. It is recommended to migrate to db2luw/db2zos/db2fori. Refer to issue #xxxx for details"); + logger.warn("Using DB2LegacyPlatform. It is recommended to migrate to db2luw/db2zos/db2fori. Refer to issue #2514 for details"); return new DB2LegacyPlatform(); case DB2LUW: return new DB2LuwPlatform();