Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1069

EJBQL: support paths across flattened relationships

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0RC2
    • 3.0RC2
    • Core Library
    • None

    Description

      Flattened relationships are not parsed properly by EJBQL yet. E.g.:

      String ejbql = "SELECT f FROM FlattenedTest3 f, FlattenedTest1 ft "
      + "WHERE f MEMBER OF ft.ft3Array AND ft = :ft";

      SELECT t0.FT2_ID AS ec0_0, t0.NAME AS ec0_1, t0.FT3_ID AS ec0_2
      FROM FLATTENED_TEST_3 t0, FLATTENED_TEST_1 t1
      WHERE EXISTS (SELECT 1 FROM FLATTENED_TEST_3 t2 WHERE t2.FT1_ID = t1.FT1_ID AND t2.FT3_ID = t0.FT3_ID) AND t1.FT1_ID = ? [bind: 1:1]

      java.sql.SQLException: Column not found: T2.FT1_ID in statement [SELECT t0.FT2_ID AS ec0_0, t0.NAME AS ec0_1, t0.FT3_ID AS ec0_2 FROM FLATTENED_TEST_3 t0, FLATTENED_TEST_1 t1 WHERE EXISTS (SELECT 1 FROM FLATTENED_TEST_3 t2 WHERE t2.FT1_ID = t1.FT1_ID AND t2.FT3_ID = t0.FT3_ID) AND t1.FT1_ID = ?]

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: