Hi Steve,

I've commited your patches. (Slight variation) 

Thanks,

--Keith

Keith Visco wrote:
> 
> Hi Steve,
> 
> Thanks for the fixes regarding IDREFS. I will take some time this
> afternoon to walk through them and apply as much as possible. I might
> not apply it exactly as you have it, but I'm sure most of your changes
> will be commited.
> 
> I'll let you know when I have updated the CVS.
> 
> Thanks again,
> 
> --Keith
> 
> Steve Vaughan wrote:
> >
> > I've been using Castor's support for IDREF Schema type for a while now, and
> > have been quite pleased.  Using an IDResolver along with the
> > SourceGenerator's reference fields works as advertised.
> >
> > However, I'm currently working on a project that requires the use of IDREFS.
> > While investigating the level of support for IDREFS within Castor, I have
> > come across several areas where IDREFS support seems to be confused with
> > NMTOKENS support:
> >
> > 1) The SourceGenerator uses a CollectionFieldHandler.  The
> > CollectionFieldHandler get and set methods work on strings separated by
> > spaces.  Although this is correct for NMTOKENS, ultimately the IDREFS need
> > to work on objects through their identities.  The get method
> > erroneously returns the concatenation of the toString method for the objects
> > being marshalled, and simply tokenizes the input into individual strings
> > during unmarshalling.  In addition, the CollectionFieldHandler has no way of
> > resolving IDREFs.  I have modified DescriptorSourceFactory to not use the
> > CollectionFieldHandler for IDREFS and to mark the reference as multivalued.
> >
> > 2) Unmarshalling always assumed that a reference field consisted of a single
> > reference value.  I modified UnmarshalHandler to break the attribute field
> > into individual IDREF tokens and handle each of the individual references.
> > This doesn't break the existing IDREF support, but now handles IDREFS
> > correctly.
> >
> > 3) Marshalling assumed that each reference field would contain not only a
> > single value, but that their would be only one class descriptor.  IDREFS
> > could reference multiple classes, each with its own class descriptor.  I have
> > modified Marshaller to handle references involving multiple value separately
> > from an individual reference.
> >
> > I have attached the diffs for the three modified files, and eagerly await any
> > comments.
> >
> > -Steve
> >
> >   ------------------------------------------------------------------------
> >                         Name: Unmarshaller.diff
> >    Unmarshaller.diff    Type: text/x-java
> >                     Encoding: base64
> >
> >                       Name: Marshaller.diff
> >    Marshaller.diff    Type: Plain Text (text/plain)
> >                   Encoding: base64
> >
> >                                    Name: DescriptorSourceFactory.diff
> >    DescriptorSourceFactory.diff    Type: Plain Text (text/plain)
> >                                Encoding: base64
> 
> -----------------------------------------------------------
> 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

Reply via email to