Hi,
To give a little Context:
I am using Castor to generate objects based on my schema and then using 
Castor JDO to persist to relational tables.
Question: 
 When there is an Object which contains a collection of dependent 
objects that need to be saved by the CastorJDO when the original object is 
saved, is it essential to have a reference to the parent object in each 
instance of the child object ? That was the only way it worked for me.
Ex:
class Parent {
 String id;
 ArrayList children;
 
public void addChild(Child child){
 children.add(child);
 child.setParent(this); // this line had to be added to make Castor JDO 
                        // work on saves !
}

If it is then the SourceGenerator needs to change to do that. I hacked the 
CollectionInfo.java and the CollectionInfoj2.java to do that on my local 
download and made it that way but didn't look at the bigger picture. Can 
we have a feature added for this please :)

thnx
Chavan

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to