Hibernate version: 3.1.3
Hi forum,
The problem is quite simple, and I hope the solution will be too ;)
I have 2 tables
TABLE_1 with a primary key made of columns A, B and C
TABLE_2 with a primary key made of columns A, B and D
I would like to map a many-to-many association between both tables using columns A and B (no need to have it bidirectionnal), but the problem is that so far I obviously always run into "Foreign key must have same number of columns as the referenced primary key", since I don't have column D in TABLE_1 nor column C in TABLE_2, to make one's foreign key match the other's primary key.
Creating an association table is not an option in my case, and I know the reason of the problem is a poor design of the database...
However, if anyone has ever ran into this situation, and found a solution, it would be most welcome!
Thanks,
alexis
|