From 07aa39c5de98ebc3aade0b3389e2a2e3307d5465 Mon Sep 17 00:00:00 2001 From: rob bygrave Date: Tue, 28 Jan 2020 09:46:24 +1300 Subject: [PATCH] #1917 - PostgresPlatform (9+) does not support IdType.IDENTITY? --- .../io/ebean/config/dbplatform/postgres/Postgres8Platform.java | 2 -- .../io/ebean/config/dbplatform/postgres/PostgresPlatform.java | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/io/ebean/config/dbplatform/postgres/Postgres8Platform.java b/src/main/java/io/ebean/config/dbplatform/postgres/Postgres8Platform.java index d8bffb775..7dcf722dd 100644 --- a/src/main/java/io/ebean/config/dbplatform/postgres/Postgres8Platform.java +++ b/src/main/java/io/ebean/config/dbplatform/postgres/Postgres8Platform.java @@ -14,8 +14,6 @@ public class Postgres8Platform extends PostgresPlatform { super(); this.dbIdentity.setSupportsGetGeneratedKeys(false); this.dbIdentity.setIdType(IdType.SEQUENCE); - this.dbIdentity.setSupportsSequence(true); - this.dbIdentity.setSupportsIdentity(true); this.columnAliasPrefix = "as c"; } diff --git a/src/main/java/io/ebean/config/dbplatform/postgres/PostgresPlatform.java b/src/main/java/io/ebean/config/dbplatform/postgres/PostgresPlatform.java index 3f8bf71a0..05fe2d026 100644 --- a/src/main/java/io/ebean/config/dbplatform/postgres/PostgresPlatform.java +++ b/src/main/java/io/ebean/config/dbplatform/postgres/PostgresPlatform.java @@ -44,6 +44,7 @@ public class PostgresPlatform extends DatabasePlatform { this.dbIdentity.setIdType(IdType.IDENTITY); this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setSupportsSequence(true); + this.dbIdentity.setSupportsIdentity(true); this.dbDefaultValue.setNow("current_timestamp");