This discussion is archived
1 Reply Latest reply: Nov 14, 2012 6:34 AM by JamesSutherland RSS

Issue while mapping two entity column into one entity column

974173 Newbie
Currently Being Moderated
Not able to succeed with when trying to join 2 entity columns to an entity.

Entity A Id, AName, ADesc, AQty

Entity B Id, AName, BQty

Entity C Id, AName, CQty

Mapping Entity A to Entity B & Entity C with column reference, not able to succeed with two joins.

@Column(name = "ANAME")
private List<EntityB> bName = new ArrayList();
private List<EntityC> cName = new ArrayList();

@JoinColumn(name = "ANAME")
private EntityA enitityA;

@JoinColumn(name = "ANAME")
private EntityA enitityA;

Join work only for EntityB, not for EntityC...

Please, give me your suggestions.


  • Correct Answers - 10 points
  • Helpful Answers - 5 points