Perhaps you could create a third entity bean that corresponds to the relation table? Then specify the relation table for the other two. Of course, I've not done it but it works in my head.
Thanks! That was what I had done and it worked.
However, new problem. QL, I have to query these two relational field. can't pass the EJB deployment.
[STDOUT] org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at line 1, column 68.
Was expecting one of:
and the QL is
select distinct object(ms) from MeetingStaff ms where ms.meetingId = ?1 and ms.staffId = ?2
both "meetingId" and "staffId" are cmr fields.
Any idea and suggestioN?
found the solution.
for 1-N,like this where bean1.cmrfield.bean2key = ?1
for N-N, like this: in (bean1.cmrfields) as b2ref where b2ref.bean2key = ?1