cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: Error when join table spans datamaps
Date Thu, 18 May 2006 22:28:39 GMT
On 5/18/06, Andrus Adamchik <andrus@objectstyle.org> wrote:
> Tough one. What DB is that, Oracle? Can you run this query from sqlplus?

I'm testing it with HSQLDB.   It'll be production on Oracle.   On
Oracle, I could "cheat" in this particular case and set up a login
that accesses both schemas.

I could probably do something similar in HSQLDB by moving both schemas
into the same database.

But the root problem seems to be that Cayenne should probably not be
doing a join this way.   There's no guarantee that two DataNodes are
running on the same database type, much less in the same database.

Maybe it should be changing the join sql into two queries.


> On May 18, 2006, at 6:01 PM, Mike Kienenberger wrote:
>
> > Here's an odd error that I've hit for the first time:
> >
> > Caused by: java.sql.SQLException: invalid schema name: ENG_WORK_MGMT
> > in statement [SELECT DISTINCT t0.ACTIVITY_YEAR, t0.BUDGET_CODE, t0.GL,
> > t0.IS_ACTIVE, t0.NAME, t0.OBJ_TYPE, t0.SUB_ACTIVITY, t0.WORK_ORDER,
> > t0.ACTIVITY, t0.ID, t0.WORK_TYPE FROM CORE_WORK_MGMT.WORK t0,
> > ENG_WORK_MGMT.AUTHORIZATION_DOC__WORK t1 WHERE t0.ID = t1.WORK_ID AND
> > (t1.AUTHORIZATION_DOCUMENT_ID = ?)]
> >
> > It's a join table where one foreign key points to a different DataMap
> > which is in a different DataNode/schema.
> >
> > Any thoughts?
> >
>
>

Mime
View raw message