Is there any way to map a relationship between tables on columns that _aren't_ keys? Say I have two tables: Person and Subscriber. These tables both contain the column EMAIL_ADDRESS, and for several reasons they cannot be connected by PK <-> FK. EMAIL_ADDRESS is a non-key column in both tables. How do I map this relationship?
Or, how do I query this without a relationship mapping in HQL with an outer join? Something like this:
Code:
SELECT subscriber, person FROM Subscriber as subscriber, Person as person
LEFT OUTER JOIN person ON subscriber.EmailAddress = person.EmailAddress
[/code]