This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes CMR in CMP EJBs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "CMR in CMP EJBs" Watch "CMR in CMP EJBs" New topic


Sri Basvanahally

Joined: Mar 17, 2005
Posts: 1
I have two tables:

VENDOR and APIs that have a Many to Many relationship. I have a join table TPCP_APIs.

I have two CMP EJBs, one mapped to Vendor and the other to API.

I made CMR fields for each other in the two EJBs.

My question is, how can I do an insert in the join table only (without creating a new Vendor or API) ?

Can I use a create method in the Vendor EJB like create(vendor_id, api_id) ?

or something similar in the API EJB as in: create(api_id, vendor_id) ?

Thanks for any help !
I agree. Here's the link:
subject: CMR in CMP EJBs
It's not a secret anymore!