Ng Keng Yap wrote:

I have a problem mapping Java object to Customer Java datatype like this.
1. How can I make a reference key in table B to the id in table A?
2. org.exolab.castor.mapping.MappingException: No convertor exists for converting type ...
this is the error i get for mapping datatype A to integer, how to create my own converter?

..

<?xml version="1.0" encoding="UTF-8"?>
<mapping>
    <class identity="id" key-generator="IDENTITY" name="B">
        <map-to table="B"/>
        *<field name="a" type="A">
            <sql name="a" type="integer"/>
^^^^^^^^^^^^^^
For the mapping above, just get rid of the 'type' attribute. Castor will automatically figure this out based on the mapping for the A class.


Please see the JDO examples (http://www.castor.org/examples.html) in the src/examples/jdo directory for examples of this.

Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\\"F9E<G)E=\\$\\!F<FEI+F-O;0\\`\\`");'


The Castor Project
http://www.castor.org/

Apache Geronimo
http://incubator.apache.org/projects/geronimo.html



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

Reply via email to