You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Nikita Timofeev (JIRA)" <ji...@apache.org> on 2017/08/31 09:30:00 UTC
[jira] [Commented] (CAY-2357) Generic select queries silently
convert result to nulls if no PK column found
[ https://issues.apache.org/jira/browse/CAY-2357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16148716#comment-16148716 ]
Nikita Timofeev commented on CAY-2357:
--------------------------------------
Fixed in *4.1* per https://github.com/apache/cayenne/commit/8452d41def3796502d297456043d97822665e3b3
> 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)