Hibernate / JPA many to many relationship through a join table and a composite key, Unique Constraint issue
So I asked this question yesterday, but the goal posts have changed and the question is different: Hibernate / JPA Collection of Elements with Many to Many relationship? I want to know if it's possible to create entities that will model my required relationship so that Hibernate will create my schema when I fire up my application. The relationship I want looks like this: 1 http://a8.sphotos.ak.fbcdn.net/hphotos-ak-ash4/417593_10150594114269218_505554217_8657377_1475865815_n.jpg The thing is that the Join table can actually contain rows that don't link to any Elements. The structure represents