I have entity classes A and C. They are mapping the tables tblA and tblC and have a many-to-many relationship between them, with tblB to map between them. tblB contains A_ID
See
@ManyToMany Hibernate Question (can add extra field?)
And
how to make a composite primary key (java persistence annotation)
regards,