Hi,
I am having problem mapping tables for one-to-many relationship. I have a table A which has composite key containing 5 columns. I have a table B which also has the composite key containing 5 columns. However, there is no relationship between these tables (why somebody would design like this but they did). Since these composite keys have three columns common in them, I want to establish one-to-many mapping between table A and B using only these three columns. But when I do that, I get the following error message.
org.hibernate.MappingException: Foreign key (table B)must have same number of columns as the referenced primary key (table A).
Please reply if you have a solution to this kind of problem.
Thanks
|