-
1. Re: CMR many-to-many relation with extra info. can I do it?
pdog4x4 Mar 14, 2006 9:29 AM (in response to hr1551)hr1551,
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!
Joshua Preston. -
2. Re: CMR many-to-many relation with extra info. can I do it?
hr1551 Mar 16, 2006 6:17 PM (in response to hr1551)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:
<IDENTIFICATION_VARIABLE> ...
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? -
3. Re: CMR many-to-many relation with extra info. can I do it?
hr1551 Mar 16, 2006 8:26 PM (in response to hr1551)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