[ 
https://issues.apache.org/jira/browse/CAY-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795558#action_12795558
 ] 

Andrus Adamchik commented on CAY-1354:
--------------------------------------

There are a few cases involved here:

1. A DataRow clearly belongs to a certain ObjEntity. Then we have the explicit 
Java type for each DB type and should return it in a DataRow. As in:

  SelectQuery q = new SelectQuery(Artist.class);
  q.setFetchingDataRows(true);

2. A DataRow can not be easily attributed to a single DbEntity. Then the result 
should correspond to a default JDBC to Java mapping. This mught be the case 
with SQLTemplate.

In your test you emulate case #2, so I don't think it is possible to match it 
back to the original type if such type is not a JDBC default mapping. (in 
addition there's a difference between the drivers in how they interpret the 
mapping, so it can get hairy real quick) So can you tell us which tests are 
failing? 

> 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_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.

Reply via email to