Cayenne 3 with Oracle 8

From: Bryan Lewis (jbryanlewi..mail.com)
Date: Mon Apr 13 2009 - 12:32:45 EDT

  • Next message: Mike Kienenberger: "Re: Cayenne 3 with Oracle 8"

    We have some apps running on an Oracle 8i database. Wow, almost 10 years
    old. Cayenne 2 has been working great. When I tried updating to Cayenne 3,
    I got a syntax error in a particular bit of SQL with a JOIN. This isn't an
    urgent problem for us but I thought I'd mention it.

    We have an Employee entity with a many-to-many relationship to Role. With a
    join table called Employee_Role.

        List roles = employee.getRoles();
        Role role = roles.get(0);

    The first fetch works but resolving the first element generates this SQL:

      SELECT DISTINCT t0.* FROM ROLE t0
        JOIN EMPLOYEE_ROLE t1 ON
        (t0.ROLE_ID = t1.ROLE_ID)
        WHERE t1.EMPLOYEE_ID = ? [bind: 1:312]

    Oracle 8i doesn't understand that JOIN...ON syntax and throws:

        java.sql.SQLException: ORA-00933: SQL command not properly ended

    The same code works fine on PostgreSQL with almost the same generated SQL.



    This archive was generated by hypermail 2.0.0 : Mon Apr 13 2009 - 12:33:21 EDT