Hibernate version:
Hibernate3
I am trying to map a legacy database that uses the same column for multiple meanings. Specifically, the 'link_id' can refer to either one of three different tables, based on a discriminator value.
Now, the obvious way of modelling this is polymorphism.... the problem is that when I do that, hibernate creates foreign key associations to all three different tables. This obviously fails, since the existance of a link_id value in one table does not imply that it exists in the other two.
Is there are way of disabling foreign key generation for a particular mapping?
|