Re: Cayenne 3 with Oracle 8

From: Mike Kienenberger (mkienen..mail.com)
Date: Mon Apr 13 2009 - 12:41:42 EDT

  • Next message: Bryan Lewis: "Re: Cayenne 3 with Oracle 8"

    By the way, when I say "could be added back in", I am not volunteering
    to do the work, only letting you know that you could probably figure
    out how to submit patches to do this by looking at Cayenne 2 code and
    porting to Cayenne 3.

    On Mon, Apr 13, 2009 at 12:40 PM, Mike Kienenberger <mkienen..mail.com> wrote:
    > Yes, you need Oracle 9 before that syntax is understood.
    >
    > Oracle 8 only understands select * from t1, t2 where t1.x = t2.x. �I
    > suppose the old oracle inner join support could be added back in.
    >
    > Outer join support is even worse for 8, and not implementable for all
    > practical purposes.
    >
    >
    > On Mon, Apr 13, 2009 at 12:32 PM, Bryan Lewis <jbryanlewi..mail.com> wrote:
    >> 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:42:27 EDT