Hi Robert, Castor doesn't have any current option for "deep" instantiation. I'm wondering if you could get by with just unmarshalling a "default" XML document which could act like your "deep" instantiation.
If that won't work for you, then you may want to open up an enhancement request (http://bugzilla.exolab.org) where the feature can be discussed and tracked. --Keith [EMAIL PROTECTED] wrote: > > I am writing an application that stores it's data to an XML file. I have been using > Castor to develop it and it is simply a wonderful framework and tool. The data that > my app uses is well structured and is represented by an object graph. The root > object is called "History" which contains many "Event" objects. Each "Event" object > has other to-one and to-many relationships and so on. The problem is that when I > instantiate a History object, I have to manually instantiate each and every > relationship. It's not a problem for small object graphs but I am dealing with a > complex object with many relationships. From what I can tell, Castor only supports > shallow instantiation meaning when you create a new instance of a class, it does not > create any of the mandatory relationships. It would be nice if there was a > SourceGenerator option to select either shallow or deep instantiation. Deep > instantiation will make it easier to code applications using complex object graphs > and kee! p ! > things consistent when the underlying schema changes. Is there such an option or is > this a feature request? > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
