I am working on converting a legacy system to use hibernate (version 3.3.x) instead of using hand crafted SQL. I have run in to some problems mapping my datamodel that pertians to composite keys. I've created a solution I think works, but I am not overly fond of it. Hence, I would like to see how the diagram below could/should be mapped and see if I am on the "right" track.
In the diagram StuffTypes is a pretty static table that don't change (no inserts or updates). Parent is the only table that currently has a DAO class associated to it (the others should be persisted when the parent instance is). Stuff has a StuffType and a number of SubStuff associated with it. Finally, SubStuff is just a many to many mapping table between Stuff and StuffTypes.
What is the best way of mapping these entities to Java objects using annotations?