I have below tables:
Table A (A_id, name, desc, pk(A_id))
Table B (A_id, B_SEQ, name, desc, pk(A_id,B_SEQ), fk(A.A_id))
Table C(C_id,name..)
JOIN TABLE:TableD(A_id, C_id, B_SEQ, pk(A-id,C_id), fk(B_SEQ))
I gave a mapping in tableB.java
Code:
@ManyToMany
@JoinTable(
name = "TableD",
joinColumns = { @JoinColumn(
name = "A_id"), @JoinColumn(
name = "B_SEQ},
inverseJoinColumns = { @JoinColumn(
name = "C_id") })
List<tableC> tableCList;
When I retrieve an instance of tableB.java I am not getting tableCList as expected.
Can any one help me in reviewing and correcting mapping.
Thanks.