cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Lewis <jbryanle...@gmail.com>
Subject Re: Cayenne 3 with Oracle 8
Date Mon, 13 Apr 2009 20:50:08 GMT
I think that sets a new record for responsiveness.  I've frequently told a
story to open-source skeptics how I got a fix in only 3 hours.  This one was
about 2:20. :-)

Yes, that fixes my test case on Oracle 8i.  The SQL it generates now is:

  SELECT DISTINCT t0.* FROM ROLE t0, EMPLOYEE_ROLE t1
  WHERE t1.EMPLOYEE_ID = ?
  AND t0.ROLE_ID = t1.ROLE_ID

Thanks!

(I'm getting accustomed to this maven thing too.)



On Mon, Apr 13, 2009 at 2:54 PM, Andrus Adamchik <andrus@objectstyle.org>wrote:

> In fact switching back to the legacy join syntax was already accomplished
> for OpenBase (see OpenBaseJoinStack) :
>
> https://issues.apache.org/jira/browse/CAY-1084
>
> So I just cloned it for Oracle8:
>
> https://issues.apache.org/jira/browse/CAY-1207
>
> This code is committed, I just don't have a way to test it. Bryan, you can
> build Cayenne from trunk or grab it from Hudson CI once it rebuilds my
> latest changes:
>
>
> http://hudson.zones.apache.org/hudson/view/Cayenne/job/Cayenne-trunk/org.apache.cayenne$cayenne-server/
>
> Andrus
>
>
>
> On Apr 13, 2009, at 7:58 PM, Bryan Lewis wrote:
>
>  Thanks.  About what I thought.  Just wanted to check.
>>
>>
>> On Mon, Apr 13, 2009 at 12:41 PM, Mike Kienenberger <mkienenb@gmail.com
>> >wrote:
>>
>>  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 <mkienenb@gmail.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 <jbryanlewis@gmail.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.
>>>
>>>>
>>>>>
>>>>
>>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message