cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAY-2357) Generic select queries silently convert result to nulls if no PK column found
Date Sun, 10 Sep 2017 11:42:00 GMT

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

Andrus Adamchik updated CAY-2357:
---------------------------------
    Fix Version/s: 4.1.M1
                   4.0.B2

> 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
>             Fix For: 4.0.B2, 4.1.M1
>
>
> {{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)

Mime
View raw message