Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-864

Subquery problems with SYNTAX_DATABASE (Oracle)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.3, 1.2.0
    • 1.0.4, 1.2.1, 1.3.0, 2.0.0-M2
    • None
    • None

    Description

      The following query does not generate the correct SQL with Oracle :
      "SELECT e,d from Employee e, Dependent d "
      + "WHERE e.empId = :empid "
      + "AND d.id.empid = (SELECT MAX (e2.empId) FROM Employee e2) "
      + "AND d.id.effDate > :minDate "
      + "AND d.id.effDate < :maxDate ";

      The problem will exist with any DBDictionary that uses JoinSyntaxes.SYNTAX_DATABASE (no joins will be created for Dependent).

      Attachments

        Activity

          People

            mikedd Michael Dick
            mikedd Michael Dick
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: