DBVA POJO+Smart Association handling generates Java with setORM method missing

Hi

Could somebody help to find a problem in the following example (see attached ER + class diagrams):

The generated Java code with POJO + Smart association handling does not compile due to the following error:

./CompileAll.sh
Special_customerDAO.java:106: cannot find symbol
symbol : method setORM_Customer(Customer)
location: class Special_customer
special_customer.setORM_Customer(customer);

Setting: DBVA4.0, Mac OS, Built: sp2_20070612

PS: One more thing. If I understand it correctly, for things to be copied properly, in the generated CompileAll.sh file the line
----------------> cp -r “$SOURCEPATH/ormmapping/” “$CLASSES”
should read either
----------------> cp -r “$SOURCEPATH/ormmapping/” “$CLASSES/ormmapping/”
or
----------------> cp -r “$SOURCEPATH/ormmapping” “$CLASSES”

ERDiagram.png
ClassDiagram.png

Hi Mikhail,

Thank you for your post. I have noticed that you are using the earlier version. Have you considered advancing to the latest one?

The problem about shell script has been fixed in VP Suite 3.1. Please download the patch at:
http://files3.visual-paradigm.com/200708/Patch/6-1-0_20070830a/VP_Suite_Linux_3_1_20070830a.sh

However, we were unable to reproduce the problem of “cannot find symbol”. I believe that this has been fixed in the latest version as well.

Best regards,
Jick

Hi Jick

To reproduce the problem you simply should have got the SP2 3.0 version up and running :slight_smile: Not so hard, isn’t it?

Anyway, you are right, the 3.1 version has this bug fixed.

For all you guys in the forum (doing the job of the VP people :slight_smile: here is a diff output comparing the code emitted by the 3.0 version to the code emitted by the 3.1 version. One can see that the proper call is being generated in the 3.1 version.

diff -u Special_customerDAO3.0.java Special_customerDAO3.1.java

@@ -103,7 +103,7 @@
if(special_customer.getCustomer() != null) {
special_customer.getCustomer().setSpecial_customer(null);
}

  •                   special_customer.setORM_Customer(customer);
    
  •                   special_customer.setCustomer(customer);
    
                      Customer_has_lenders[] lLends_tos = special_customer.lends_to.toArray();
                      for(int i = 0; i < lLends_tos.length; i++) {
    

Cheers