Ralf Joachim wrote:

Hi Sean,

your mapping seam to be OK.

Which methods to access the colComponents property in jpProduct have you implemented (get/set/add) and how do they look like?

How do the failing part of code looks like where you add Component B to Produkt Y?

Regards
Ralf

Hi Ralf

Sorry that it has taken so long to get back to you.


Here are the methods in jpProduct that control get/set/add  actions.

public ArrayList getColComponents() {
       return colComponents;
}

public void setColComponents(ArrayList list) {
       colComponents = list;
}
public Object getColComponents(int index){
    Object o = colComponents.get(index);
    return o;
}
public boolean addColComponents(Object o){
       jpComponent thisComponent = (jpComponent) o;
       if(colComponents.contains(thisComponent)==false){
           thisComponent.addColProducts(this);
           return colComponents.add(thisComponent);
       } else {
           return false;
       }
}

The problem is, that once I add the component to a particular product, and update them both, Castor takes it upon itself to delete all references to the component in other products. This is an extremely puzzling behaviour.

Many thanks in advance for any insight you can offer.

Have a better day
Sean






-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to