[ 
https://issues.apache.org/jira/browse/CAY-2357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev closed CAY-2357.
--------------------------------
    Resolution: Fixed

Fixed in *4.0* per 
https://github.com/apache/cayenne/commit/d51c51a5709611b233c431f15e2beb7c4346dab8

> Generic select queries silently convert result to nulls if no PK column found
> -----------------------------------------------------------------------------
>
>                 Key: CAY-2357
>                 URL: https://issues.apache.org/jira/browse/CAY-2357
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 4.0.B1, 4.1.M1
>            Reporter: Nikita Timofeev
>            Assignee: Nikita Timofeev
>            Priority: Minor
>
> {{SQLTemplate}} by default tries to convert result into object 
> ({{selectDataRows}} set to {{false}}),
> however if there are no PK columns for required entity in result this lead to 
> {{null}} without any hit to the user. That definitely leads to confusion, see 
> this SO question for example 
> https://stackoverflow.com/questions/45907666/select-custom-data-with-cayenne-return-empty-lines
>  
> Problem is that {{EJBQL}} uses very same logic for result conversion, so this 
> should be fixed keeping in mind that {{null}} is a valid result in case of 
> some OUTER JOIN, or missing to-one relationship. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to