You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "V.B. Skrypnyk" <va...@skrypnyk.net> on 2003/03/18 18:59:58 UTC
FK to non-PK relationship
I saw posts on the following subject, but didn't see any replies:
If a persistent class A has a reference to a persistent class B, can the
foreign key in class B point to a field that is NOT the primary key in class
A? If my understanding is correct it's impossible to do right now, at least
I can't see a way to declare such a relationship in the repository (I
concede that such situations shouldn't occur, but consider legacy data).
Anyway, I thought that perhaps as a quick fix, the concept of
QueryCustomizer can be extended to reference-descriptors as well. This way
the user can programmatically adjust the query and set the related fields.
Cheers,
--Bill.