Paul Springer wrote:
> 
> > >
> >
> > The descriptor was designed to be used by the Marshalling Framework, not
> > really intended for general interaction with the object model. To delete
> > elements from the object model, simply use the Object model itself and
> > not the descriptor.
> >
> 
> Ouch--that's very bad news.  The huge advantage of using Castor (I thought) was
> that through its descriptors I could manipulate the objects, without my code
> knowing anything about the objects.  

Interesting. That wasn't the intended use of the descriptors, but it's
an interesting side effect for the most part. However, for multivalued
items you are running into a limitation of that side-effect. Since
Castor only uses the descriptors for building up the entire object model
during unmarshalling, or referencing all the items of the collection for
marshalling.

> If I use the object model instead of the descriptors, I have to change my code every 
> time the schema changes.  If I could use the descriptors instead, I would only 
> have to rebuild the schema and then
> rerun the SourceGenerator and recompile (automated steps) and _not_ have to
> modify my code.
> 

In order to support general manipulation of the multivalued elements
some changes would be needed to the CollectionHandler API as well as the
FieldHandler interface. 

I wouldn't be against such changes, but they would have to be made in
such a way that doesn't effect already existing generated classes. I'll
have to give it some thought. 

--Keith

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

Reply via email to