The reverse engineering mapping of many-to-many relationships doesn't get generated correctly if the primary key of one of the involved tables consists of more than one field. I initially noticed the issue with hibernate tools 3.2.b8 jar, but the same issue is there in 4.x version as well.
This is the same issue reported under https://hibernate.onjira.com/browse/HBX-939
I made a fix locally and got it working. The fix for it can be found in the JIRA comments section. I spent lot of time on this issue, so thought of sharing it here to help others who may be looking for a fix.
|