Hi,
I'm a hibernate beginner and I have a very small seam application i'm building. Obviously hibernate is to be used but i'm a little confused as to what the database design should be. The application is basic:
1. Two types of materials exist, raw material and processed materials.
2. A processed material is to be constructed from two or more raw materials.
3. The price of the raw materials is to be entered by the user and saved in the database.

The basic design I have been able to come up with is placed as an image here. The problem with the design is that there is no way that I can load the quantity of the material as well without creating a seperate class from the base raw material class. The quantity can vary from 1 to 100 so can't hardcode it either. Any ideas? suggestions?

Thanks.