Hi,
Association:
-------------
When 1:Many link is created between 2 BMPs, CocoBase adds
a select<method suffix> method the BMP which returns array
of remote interface of the other BMP. We created link
between Dept and Employee. One dept can have many employees.
the method created in the Dept BMP was selectEmployee().
But the code written inside this has a problem. Code
generated inside this method is:
for(int i=0; i<v.size(); i++) {
lnk_Employee[i] = (EmployeeInterface)v.elementAt(i); }
return lnk_Emloyee;
This was giving us ClassCastException while we were testing the navigability in Visual Age for Java as well as in IBM WebSphere 3.5. We had to change the same and then it worked. The change is as follows:
for(int i=0; i<v.size(); i++) {
lnk_Employee[i] = (EmployeeInterface) javax.rmi.PortableRemoteObject.narrow(v.elementAt(i), EmployeeInterface.class); }
return lnk_Emloyee;
Please check this out as this requires manual intervention
in the code generation process.
|