File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes CMR Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "CMR" Watch "CMR" New topic


Monmohan Singh
Ranch Hand

Joined: Aug 02, 2002
Posts: 82
I have an EnityBean say Customer with primary key as CustID
I have another EntityBean Address as primary key, a composite with AddressID and CustID
Also, CustID in Address table is the foriegn key for Customer table
Will it create any problem in CMR , one to may from customer to address
Since, the same column in Address table , i.e CustID is used as a part of primary key as well as forign key to Customer table.
Since the conatiner will try to update the table two times , once at the time of creation of a row in Address table and another time when I am setting the CMR in Customer Table
Pl help
deepak yadav

Joined: Oct 04, 2001
Posts: 17
I faced similar situation. CMR fields are updated in postCreate() but if the CMR field also happens to be a primary key then you have to set it in the create() directly (by using setCustomerId(..)) i.e. the setter method of that CMR field (setCustomerProfile(CustomerLocal ..)) is never used and the getter method would fine.
Don't get me started about those stupid light bulbs.
subject: CMR
jQuery in Action, 3rd edition