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

Andrus Adamchik closed CAY-1686.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1M4

Done. An annoying limitation is that just like QueryChain, this query can only 
return DataRows in a general case, as Cayenne runtime can only convert the 
first list in QueryResponse to objects, but here we may get many lists. A 
really arbitrary limitation IMO. Anyways, this can be used like this:

QueryResponse response = runtime.getContext().performGenericQuery(query);
while (response.next()) {
    List<DataRow> list = (List<DataRow>) response.currentList();
    // do something, e.g. convert this to a list of Persistent objects
}
                
> StringIdQuery - a query providing an optimized fetch for objects based on 
> 1..N String IDs. 
> -------------------------------------------------------------------------------------------
>
>                 Key: CAY-1686
>                 URL: https://issues.apache.org/jira/browse/CAY-1686
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Lifecycle Extensions
>    Affects Versions: 3.1M4
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 3.1M4
>
>
> We need a query that can provide an optimized fetch for objects based on 1..N 
> String IDs. 
> In my projects I have a bunch of APIs that would provide me a with collection 
> of String IDs that I'd like to convert to a collection of target objects 
> across whatever many tables. Been doing that manually till now. Would be cool 
> to encapsualte this operation in a query. BTW we have a prototype of such 
> query already - org.apache.cayenne.lifecycle.relationship.ObjectIdBatchFault

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to