cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject cayenne git commit: CAY-2361 PostgreSQL DbGenerator issues
Date Tue, 03 Oct 2017 09:26:53 GMT
Repository: cayenne
Updated Branches:
  refs/heads/STABLE-4.0 53fc0ae3e -> e88766ee6


CAY-2361 PostgreSQL DbGenerator issues

(cherry picked from commit 4b48a002dde2527ac71b3b06485288bac3b18d97)


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/e88766ee
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/e88766ee
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/e88766ee

Branch: refs/heads/STABLE-4.0
Commit: e88766ee63a313996ec7341ebc38dc863f407e61
Parents: 53fc0ae
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Tue Oct 3 12:26:48 2017 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Tue Oct 3 12:26:48 2017 +0300

----------------------------------------------------------------------
 .../java/org/apache/cayenne/dba/postgres/PostgresAdapter.java     | 3 +++
 docs/doc/src/main/resources/RELEASE-NOTES.txt                     | 1 +
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/e88766ee/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
b/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
index c9dd4af..8fc277e 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
@@ -232,6 +232,9 @@ public class PostgresAdapter extends JdbcAdapter {
 
 	@Override
 	public boolean typeSupportsLength(int type) {
+		if(Types.DOUBLE == type || Types.REAL == type){
+			return false;
+		}
 		// "bytea" type does not support length
 		String[] externalTypes = externalTypesForJdbcType(type);
 		if (externalTypes != null && externalTypes.length > 0) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e88766ee/docs/doc/src/main/resources/RELEASE-NOTES.txt
----------------------------------------------------------------------
diff --git a/docs/doc/src/main/resources/RELEASE-NOTES.txt b/docs/doc/src/main/resources/RELEASE-NOTES.txt
index 126abdb..c7fd1f9 100644
--- a/docs/doc/src/main/resources/RELEASE-NOTES.txt
+++ b/docs/doc/src/main/resources/RELEASE-NOTES.txt
@@ -13,6 +13,7 @@ Date:
 ----------------------------------
 Bug Fixes:
 
+CAY-2361 PostgreSQL DbGenerator issues
 CAY-2364 Wrong logging in SQLTemplate
 CAY-2365 SQLExec query tries to convert (unexpected) result set into objects
 CAY-2367 ClassCastException reading object with an attribute of type 'char'


Mime
View raw message