Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-318

"IS NULL" problem with EJBQL

    XMLWordPrintable

Details

    Description

      SourceForge Submitter: mtkopone .

      OS: Linux with JDK 1.4.1

      I've encountered a problem with the "IS (NOT) NULL"
      expression in ejbql and jbossql when attempting to find
      entities using dynamic queries.

      Example EJBQL query:
      SELECT OBJECT(a)
      FROM A a
      WHERE
      a.b.c IS [NOT] NULL

      Problem:
      If b is a CMR field and c is a CMP field, the generated
      SQL does not include the table name of the b-entity in
      the SQL FROM clause, even though it's alias is used in
      the SQL WHERE clause. This results in an
      SQLException.

      I've included a tiny patch the worked fine for me, but
      since I have no experience with jjt someone should
      probably check that it doesn't break anything major.

      mikko koponen
      Krocus Communications, Finland

      Attachments

        Activity

          People

            olubyans@redhat.com Alexey Loubyansky
            sourceforge-user SourceForge legacy user (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: