IYHWrestling.com | WithoutYourHead.com

Welcome to In Your Head! Wrestling podcast, news and community!

Hibernate Triple Many

Posted in Wrestling Forums by carpinteyroktp at 03:25, Sep 07 2013


é??ç¸?ibernate Triple Many

To illustrate, say I have three tables relating to automobiles: , woolrich Make, and . A has a tiffany uk stores many to many relationship with Make <a href="http://www.cai-catanzaro.it/moncler/">moncler outlet on line</a> (ie: Honda, Ford, etc) and a <a href="http://www.cai-catanzaro.it/borsegucci/">borse gucci online</a> Make has a many to many relationship with the (ie: Passport, Accord, etc). (Note, in real life I'm sure Make's and 's don't have a many to many relationship, but I'm using this relationship for illustration <a href="http://www.madeelodesign.de/isabelmarantsneaker/">isabel marant sneaker wedges</a> purposes). Given a particular , I'd like to get all the Make's they carry, and from each Make I'd like to get all the 's of that Make that the moncler outlet on line carries. They may not carry every of a particular Make, so it should only return 's they carry.

I know how to do a manytomany relationship isabel marant sneaker wedges between and Make and borse gucci online a manytomany relationship between a Make and . The problem is I don't know how to relate only the s that the carries.

What is the best way to model the join tables and what would the JPA/Hibernate annotations be on my java model objects?

Inventory (, Make, )1, 2, 3 (Motor Exports, Fort, Taurus)In Hibernate you model Inventory as its own entity with an embedded primary key. In abbreviated <a href="http://www.photo2video.co.uk/tiffanyuk/">tiffany uk stores</a> form, <a href="http://www.postzegels-poststukken.eu/woolrichjassen/">woolrich</a> it would look like this:public class Inventory {// additional attributes.

Quick Reply

Sorry, commenting is currently disabled.

IYH ON FACEBOOK
Follow IYH on Twitter Subscribe to IYH on iTunes
Upcoming Events

Date

Event