Home | Contact | Bookmark Trusted Choice | Sitemap

Top Rated Articles

Customer Management Relationship Vendor question




I am facing a problem while defining Customer Management Relationship(cmr).
I am having two local entity beans Vendor Bean and Address Bean.
The primary key (vendorId) of VendorBean is the foreign key for the AddressBean
with same name(vendorId).I defined the relation as one to one unidirectional to
the VendorBean. ie,
accessor methods are in VendorBean which returns & sets AddressLocal. And there
is accessor methods for the foreign key of AccessorBean.
Now the problem is while i am invoking setVendorId(id)from ejbCreate (), i am
getting an exception as follows

"When a cmp-field and a cmr-field (relationship) are mapped to the same column,
the setXXX method for the cmp-field may not be called. The cmp-field is read-only."

So i removed the setVendorId () from ejbCreate , its working but not setting the
foreign key. I want to set the foreign key also. So how can i do it?
Get answer check in :


http://216.148.48.158/news/ArticleFrame.jsp?server=newsgroups.bea.com
http://e-docs.bea.com/wls/docs70/faq/ejb.html

Other Articles