[
https://issues.apache.org/jira/browse/JDO-760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15942441#comment-15942441
]
Tilmann Zäschke commented on JDO-760:
-------------------------------------
The idea behind only allowing {{iterator()}}, {{size()}} and {{isEmpty()}} is
to support queries with cursored results (large result sets).
Question: For cursored queries, how should we handle the case when
{{iterator()}} is called a _second_ time? For cursored query results this may
require to execute the query a second time, because the early results may have
already been dropped. Or should we allow that {{iterator()}} is only called
once and throws some kind of exception when it is called a second time?
> Spec update regarding whether Query.execute() returns List or Collection
> ------------------------------------------------------------------------
>
> Key: JDO-760
> URL: https://issues.apache.org/jira/browse/JDO-760
> Project: JDO
> Issue Type: Improvement
> Components: specification
> Affects Versions: JDO 3.1
> Reporter: Tilmann Zäschke
> Assignee: Tilmann Zäschke
> Priority: Trivial
> Labels: documentation
> Fix For: JDO 3.2
>
>
> The spec says in Section 14.6.1 that Query.execute() returns an unmodifiable
> {{List}}.
> However, the text in Section 14.3 ('uniquenes'), Section 14.10.2 and all
> examples in Section 14.10 suggest that a {{Collection}} is returned. I
> suggest updating the spec to refer to {{List}} in the listed sections.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)