Hi,
I've inherited a database schema where a single Relationship table is responsible for all the associations between tables, and the Relationship table stores the relationship_type, left_side and right_side columns.
So, if I have 4 tables:
* User
* Company
* Address
* Telephone
and the Relationship table, the relationship_type would be used to determine whether a row in the Relationship was mapping:
* User to Company
* User to Address
* Company to Address
* User to Telephone
* etc
Is there any way to configure Hibernate to cope with such a DB Schema? I have looked at the Hibernate Reference Documentation, but didn't see anything in the chapter about Associations which suggests that this is possible.
Unfortunately at this time, changing the schema is not an option.
Thanks!!
B[/list]
|