FAQ

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

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
groupuser @
categoriescayenne
postedAug 25, '11 at 10:37a
activeSep 5, '11 at 1:35p
posts4
users2
websitecayenne.apache.org

People

Translate

site design / logo © 2022 Grokbase