JDO
  1. JDO
  2. JDO-320

Add negative query test for projecting a map and collection field to tck20

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JDO 2 rc1
    • Fix Version/s: JDO 2 final (2.0)
    • Component/s: tck
    • Labels:
      None

      Description

      The latest version of the JDO spec disallows JDOQL queries projecting a collection or map field, e.g.
      SELECT p.phoneNumbers FROM org.apache.jdo.tck.pc.company.Person p
      SELECT d.employees FROM org.apache.jdo.tck.pc.company.Department d
      We should add a test method running the above queries which should result in a JDOException.

      1. JDO-320.patch
        2 kB
        Michael Bouschen

        Activity

        Hide
        Michael Bouschen added a comment -

        Attached you find a patch JDO-320.patch for review. It adds the two negative test queries to the ResultExpressions class.

        Please note, that the current JPOX version currently accepts JDOQL queries returning a collection field, so the negative test fails.

        Show
        Michael Bouschen added a comment - Attached you find a patch JDO-320 .patch for review. It adds the two negative test queries to the ResultExpressions class. Please note, that the current JPOX version currently accepts JDOQL queries returning a collection field, so the negative test fails.
        Hide
        Craig L Russell added a comment -

        Looks good.

        Show
        Craig L Russell added a comment - Looks good.
        Hide
        Michael Bouschen added a comment -

        Checked in the patch which adds two negative test queries to class org.apache.jdo.tck.query.result.ResultExpressions (see revision 383191).

        Assigning the issue to Erik, becaue the current JPOX version allows projection of collection and map fields, so the negative tests fail.

        Show
        Michael Bouschen added a comment - Checked in the patch which adds two negative test queries to class org.apache.jdo.tck.query.result.ResultExpressions (see revision 383191). Assigning the issue to Erik, becaue the current JPOX version allows projection of collection and map fields, so the negative tests fail.
        Hide
        Erik Bengtson added a comment -

        should be fixed in JPOX CVS now

        Show
        Erik Bengtson added a comment - should be fixed in JPOX CVS now
        Hide
        Craig L Russell added a comment -

        Fixed with the latest JPOX build.

        Show
        Craig L Russell added a comment - Fixed with the latest JPOX build.

          People

          • Assignee:
            Erik Bengtson
            Reporter:
            Michael Bouschen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development