Thanks Steve...I checked it in.
I think the better patch would be for Castor JDO to work with any
FieldHandler implementation, however I am not sure why they cast to
FieldHandlerImpl, and I don't really mess with the JDO code. Maybe
Thomas or Bruce can elaborate on that one.
In anycase your fix is checked in.
Thanks again,
--Keith
Steve Vaughan wrote:
>
> I noticed that a new "handler" attribute is available for field mapping of
> existing classes. I think this is a great idea, but unfortunately, this
> causes problems with JDO. The JDO classes expect a FieldHandlerImpl, not a
> FieldHandler. The following fix will allow the use of user defined handlers
> with JDO mappings.
>
> -Steve
>
> $ cvs diff -u src/main/org/exolab/castor/mapping/loader/MappingLoader.java
> Index: src/main/org/exolab/castor/mapping/loader/MappingLoader.java
> ===================================================================
> RCS file:
> /cvs/castor/castor/src/main/org/exolab/castor/mapping/loader/MappingLoader.java,v
> retrieving revision 1.74
> diff -u -r1.74 MappingLoader.java
> --- src/main/org/exolab/castor/mapping/loader/MappingLoader.java 6 Dec
> 2001 01:10:07 -0000 1.74
> +++ src/main/org/exolab/castor/mapping/loader/MappingLoader.java 29
> Jan 2002 19:31:36 -0000
> @@ -634,7 +634,8 @@
> FieldDescriptorImpl fieldDesc =
> new FieldDescriptorImpl( fieldName,
> typeInfo,
> - userDefinedHandler,
> + new FieldHandlerImpl (
> + userDefinedHandler, typeInfo),
> fieldMap.getTransient() );
>
> fieldDesc.setRequired(fieldMap.getRequired());
>
> -----------------------------------------------------------
> 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