[
https://issues.apache.org/jira/browse/CAY-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797026#action_12797026
]
Andrus Adamchik commented on CAY-1354:
--------------------------------------
Here is the commit that introduced this code. It was a response to a user issue
(also with SQLTemplate), so looks like this thing varies by driver and
reverting current policy may result in problems elsewere. So I suggest that we
don't apply January 6 patch unless we can confirm that the old issue does not
reemerge.
commit ffff9cdaa8d407d31b3c4e289e228a3e33816c24
Author: Andrus Adamchik <[email protected]>
Date: Fri May 9 08:25:56 2008 +0000
CAY-672 Change the logic to get the Java class from ResultSetMetadata
CAY-1052 Invalid cast on NUMERICs with scale of 0 using Postgres JDBC 8.2+
git-svn-id:
https://svn.apache.org/repos/asf/cayenne/main/branches/stable-...@654717
13f79535-47bb-0310-9956-ffa450edef68
diff --git
a/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/access/jdbc/ColumnDescriptor.java
b/cayenne/cayenne-java/src
index c8a7c54..b5feca4 100644
---
a/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/access/jdbc/ColumnDescriptor.java
+++
b/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/access/jdbc/ColumnDescriptor.java
@@ -189,8 +189,7 @@ public class ColumnDescriptor implements Serializable {
this.qualifiedColumnName = name;
this.label = name;
this.jdbcType = metaData.getColumnType(position);
- this.javaClass =
getDefaultJavaClass(metaData.getColumnDisplaySize(position),
- metaData.getScale(position));
+ this.javaClass = metaData.getColumnClassName(position);
}
/**
@@ -355,4 +354,4 @@ public class ColumnDescriptor implements Serializable {
public void setLabel(String columnName) {
this.label = columnName;
}
-}
\ No newline at end of file
+}
> Wrong Types mapping for selected values in Row Queries
> ------------------------------------------------------
>
> Key: CAY-1354
> URL: https://issues.apache.org/jira/browse/CAY-1354
> Project: Cayenne
> Issue Type: Bug
> Components: Cayenne Core Library
> Affects Versions: 3.1M1
> Reporter: Evgeny Ryabitskiy
> Assignee: Evgeny Ryabitskiy
> Priority: Critical
> Fix For: 3.1M1
>
> Attachments: CAY-1354.patch, CAY-1354_TEST.patch,
> ReturnTypesMappingTest.java
>
>
> By default every SQL type is mapped to some Java type by modeler.
> I am expecting same behavior in common DataRow queries (without ORM).
> But in fact half of types are not mapped correctly....
> Attached JUnit test can to explain problem with more details...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.