You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@causeway.apache.org by "Daniel Keir Haywood (Jira)" <ji...@apache.org> on 2023/07/03 07:35:00 UTC

[jira] [Resolved] (CAUSEWAY-3507) RepositoryService#allMatches should support JDOQL that has a 'result'

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

Daniel Keir Haywood resolved CAUSEWAY-3507.
-------------------------------------------
    Resolution: Fixed

> RepositoryService#allMatches should support JDOQL that has a 'result'
> ---------------------------------------------------------------------
>
>                 Key: CAUSEWAY-3507
>                 URL: https://issues.apache.org/jira/browse/CAUSEWAY-3507
>             Project: Causeway
>          Issue Type: Improvement
>          Components: Persistence JDO
>    Affects Versions: 2.0.0-RC1
>            Reporter: Daniel Keir Haywood
>            Assignee: Daniel Keir Haywood
>            Priority: Major
>             Fix For: 2.0.0-RC2
>
>
> given this JDOQL:
> SELECT DISTINCT this.paymentMethod FROM IncomingInvoice
> it is not possible to submit using RepositoryService#allMatches(...)
>  
> compared to v1, the reason seems to be that we used to use JDOQuery#executeWithMap(), whereas now we use JDOQuery#executeList, and the latter has a check for whether there is a return phrase (ie "DISTINCT this.paymentMethod").
> The fix, I think, is to call either JDOQuery#executeResultList  rather than JDOQuery#executeList if there is a result phrase.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)