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 "Robert S. Sfeir" <ro...@codepuccino.com> on 2003/03/07 19:35:37 UTC
Inverse foreign key from multiple tables to one table
Hi,
I have a situation where I have one table called Events. It's like a
logging table. The table has a couple of columns in it one of which is
called whatID. This column represents the primary key id of any object
in any table for which the object is affected. So say you update a
user, the whatID is the equivalent of the userID, if you update an
address the the whatID is the addressID.
I am trying to figure out the proper way of setting up inverse foreign
keys so that when I do a select on userID I want to also populate the
log of changes to that user. Is this possible?
Thanks