Skip to content

Commit 2a3b426

Browse files
committed
#2644: PostgreSQL10Platform, fix the printFieldIdentityClause
1 parent bcbf464 commit 2a3b426

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/PostgreSQL10Platform.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) 2026 Contributors to the Eclipse Foundation. All rights reserved.
23
* Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved.
34
*
45
* This program and the accompanying materials are made available under the
@@ -14,12 +15,15 @@
1415
// 13/01/2022-4.0.0 Tomas Kraus - 1391: JSON support in JPA
1516
package org.eclipse.persistence.platform.database;
1617

18+
import org.eclipse.persistence.exceptions.ValidationException;
1719
import org.eclipse.persistence.internal.localization.LoggingLocalization;
1820
import org.eclipse.persistence.internal.sessions.AbstractSession;
1921
import org.eclipse.persistence.logging.DefaultSessionLog;
2022
import org.eclipse.persistence.logging.SessionLog;
2123
import org.eclipse.persistence.tools.schemaframework.FieldDefinition;
2224

25+
import java.io.IOException;
26+
import java.io.Writer;
2327
import java.sql.CallableStatement;
2428
import java.sql.PreparedStatement;
2529
import java.sql.SQLException;
@@ -145,4 +149,13 @@ public void setParameterValueInDatabaseCall(
145149
}
146150
}
147151

152+
@Override
153+
public void printFieldIdentityClause(Writer writer) throws ValidationException {
154+
try {
155+
writer.write(" GENERATED BY DEFAULT AS IDENTITY");
156+
} catch (IOException ioException) {
157+
throw ValidationException.fileError(ioException);
158+
}
159+
}
160+
148161
}

0 commit comments

Comments
 (0)