|
Dear Bruce,
Thanks for the reply.
As far as I know from the documentation, Castor only supports XDoclet for OR Mapping to DDL generation. Xdoclet requires generated object source to be altered on its javadoc header tags, which is not so ideal i should say. Regeneration of the objects from XSD will override the remove the javadoc tags added. Any other way of generating DDL?
Can you please give me some guidance?
Thank you very much.
Cheers,
Ng Keng Yap
-------Original Message-------
Date: Wednesday, October 06, 2004 18:56:49
Subject: Re: [castor-user] Mapping for customized object
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.
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
Apache Geronimo
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
unsubscribe castor-user |