Re: sql for qualifier that spans two databases
Re: sql for qualifier that spans two databases
- Subject: Re: sql for qualifier that spans two databases
- From: Art Isbell <email@hidden>
- Date: Wed, 18 Jul 2007 13:04:54 -1000
On Jul 18, 2007, at 4:54 AM, Travis Britt wrote:
Hoping someone can quickly tell me if this should be possible
without writing my own SQL.
Two databases.
Two EOModels, one for each database.
A to-one relationship from an entity in one model to an entity in
the other.
An EOQualifier is built from a search form that includes attributes
on both entities (each in different models.) The destination key
path is entered as "relationshipName.attributeName."
The SQL generated for the qualifier references both tables as if
they were in the same DB (this is Oracle 9i using OraclePlugin, WO
5.3.)
Which blows up since of course the tables aren't in the same view/DB.
You shouldn't necessarily have to write your own SQL, but you will
have to prevent EOF from generating SQL that joins entities in
different DB's as you've discovered. Instead, you'll need ask EOF to
fetch from the join entity(s) in one DB and do the join in your Java
code by fetching from the join entity(s) in the other DB based on the
objects fetched from the first DB.
Aloha,
Art
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden