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

Reply via email to