> I was able to do this in the past by editing the .map.xml file by hand to add 
> the relationships.

Ouch.

> To do this I added a foreign key on the database for one table temporarily, 
> and let Cayenne infer this relationship. This produced the relationship that 
> I needed. I was then able to delete the foreign key, and hand-write the other 
> relationships to match the first.

Heh. We wouldn't need to do that, since we do have foreign keys, so we already 
have a model to work from.

> It worked surprisingly well,

Good to hear that.
Though I'd prefer to be able to do that in Modeler. But well, you can't have 
everything.

> but the real fix is to add foreign keys to your database.

Not on views.
I can't even define them at the view level. Not in Oracle anyway.
And while I'd like the database to automatically infer the constraints on views 
from those specified at the table level, I'm not visionary enough to actually 
expect that to be available in my lifetime.

Regards,
Jo

Reply via email to