This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Here I have associated Vechicle-Feature by many-to-many relationship. I am also storing the price of a particular feature for a particular vehicle in VehicleFeatures table. I would like to know is this correct way to map association between Vehicle and Feature or should I use One-Many relationship? If the association is correct how do I include it in mapping file of VehicleFeatures.hbm.xml. The problem is what should I use in the <id> tag of this mapping file. Below are the mapping files that I have created
VehicleFeatures.hbm.xml (My problem is how do i write this file, what should be specified in the <ID> tag)
Since I need an explicit mapping for VehicleFeatures, so haven't used many-to-many between Vehicle and Feature.