Hey folks,
I really searched the forums for my problem but I couldn't find a working solution for my problem, which is :
- I've got two mappings.
- Both have a composite-id.
- One mapped class has a Set of the second mapped class
- on server startup I get an Hibernate MappingException:
Foreign key (BAR [FOO_ID,LANGUAGE])) must have same number of columns as the referenced primary key (FOO [FOO_ID])
The Mappings are as stated below:
The class com.Foo has the fields
- fooId, language (
String)
- bars (Set)
The class com.Bar has the fields
- barId, language
The table FOO has the columns
- FOO_ID, LANGUAGE
The table BAR has the columns
- BAR_ID, LANGUAGE, FOO_ID
O.k. - Sorry for this mega text but I REALLY have no clue
how to solve my problem. Hopefully somebody in here has.
For today I will shutdown my computer and hope that some
wise pixie will drop me a sulotion that night
Thanx a lot in advance!
Thomas