cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r817391 - in /cayenne/main/branches/STABLE-1.2/cayenne: cayenne-java/src/cayenne/java/org/objectstyle/cayenne/dba/TypesMapping.java cayenne-other/release-notes/RELEASE-NOTES-1.2.5.txt
Date Mon, 21 Sep 2009 20:06:14 GMT
Author: aadamchik
Date: Mon Sep 21 20:06:14 2009
New Revision: 817391

URL: http://svn.apache.org/viewvc?rev=817391&view=rev
Log:
CAY-1259 Wrong Mapping for NUMERIC Type

patch by Evgeny Ryabitskiy

Modified:
    cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/dba/TypesMapping.java
    cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.5.txt

Modified: cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/dba/TypesMapping.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/dba/TypesMapping.java?rev=817391&r1=817390&r2=817391&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/dba/TypesMapping.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/dba/TypesMapping.java
Mon Sep 21 20:06:14 2009
@@ -436,7 +436,11 @@
     public static String getJavaBySqlType(int type, int length, int precision) {
 
         if (type == Types.NUMERIC && precision == 0) {
-            type = Types.INTEGER;
+            if (length < 10) {
+                type = Types.INTEGER;
+            } else if (length < 19) {
+                type = Types.BIGINT;
+            }
         }
         return (String) sqlEnumJava.get(new Integer(type));
     }

Modified: cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.5.txt
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.5.txt?rev=817391&r1=817390&r2=817391&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.5.txt
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.5.txt
Mon Sep 21 20:06:14 2009
@@ -17,3 +17,4 @@
 CAY-672 Change the logic to get the Java class from ResultSetMetadata
 CAY-941 NPE in SimpleNode.connectChildren()
 CAY-1052  Invalid cast on NUMERICs with scale of 0 using Postgres JDBC 8.2+
+CAY-1259 Wrong Mapping for NUMERIC Type



Mime
View raw message