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 Chris Halverson <cd...@halverson.org> on 2003/04/08 20:57:30 UTC

Foreign key w/ diff column names?

Maybe I just missed this in the docs, if so, sorry in advance.

I have some tables (I cannot change them, they are for some other
software packages that I am writing a web front end to) that have
foreign keys but use different column names. For example, virtually
every table has a column 'createuser', which is a id called
'contactid' in a contact table:

ticket
======
ticketid
createuser
...

contact
=======
contactid
firstname
...

Basically, I need want to use a refernce-descriptor (OJB 1.0rc2) in
ticket to get the contact based on the 'createuser' column.

Can this be done? Once again, I cannot change the database structure
at all. Sorry.

Thanks!

cdh

-- 
Chris D. Halverson                         http://www.halverson.org/