Uploaded image for project: 'JDO'
  1. JDO
  2. JDO-778

Adding overloaded methods to JDOQLTypedQuery to create a correlated subquery

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • JDO 3.1
    • JDO 3.2
    • api
    • None

    Description

      I propose to add the following overloaded subquery methods to support correlated subqueries using a relationship field of the from clause of the subquery, e.g.

      select firstname from org.apache.jdo.tck.pc.company.Employee
        where this.weeklyhours >
           (select AVG(e.weeklyhours) from this.department.employees e where e.manager == this.manager)

      <E> JDOQLTypedSubquery<E> subquery(CollectionExpression<Collection<E>, E> candidateCollection, String candidateAlias);
      <E> JDOQLTypedSubquery<E> subquery(ListExpression<List<E>, E> candidateList, String candidateAlias);
      <K, V> JDOQLTypedSubquery<Map.Entry<K, V>> subquery(MapExpression<Map<K, V>, K, V> candidateMap, String candidateAlias);

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mbo Michael Bouschen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m