Hi Jeff, > I am currently generating Java code from an XML Schema with > Castor. Now I > want to persist some instances of the generated Java code to > a database > (rather than marshal back to XML). Is there any way to use > Castor JDO to do > this? I was thinking I'd write a mapping file for the Java types that > Castor generated from the Schema, but the data seems to be private.
The class variables are private, but they all have a getter/setter method! > I can just stop using the Schema for this portion and write some Java > classes directly, but I was hoping there's a better way. The better way is through the Castor JDO binding. Create a XML mapping which explains, how classes are 'reflected' to the database table(s) / field(s) that you are would like to use. Then ask the experts here again. Untill now I wasn't succesfull to use Castor JDO, because of lack of documentation including proper examples. (And explenation of all the related stuff around JDO (caching, locking, etc, etc.). In the meanwhile I started looking for some other o/r mapping implemenations. The one from OpenFusion has a nice Developer's guide. This guide gave me the information which I couldn't find on the Castor site. Now reading the CocoBase programmers guide, that seems to be even better as the OpenFusion one. Succes, Tjeerd references: OnJava article about JDO 'Using Java Data Objects' example with OpenFusion http://www.onjava.com/pub/a/onjava/2002/02/06/jdo1.html This example didn't work, because it was build on OpenFusion v1.0, but with contact to the author and OpenFusion support I got it working. CocoBase http://www.thoughtinc.com/cber_info.html 30 day trail version downloadable. OpenFusion http://www.prismtechnologies.com/English/Downloads/JDO/index.html 30 day trail version downloadable. Suggested improvments for documentation for Castor XML/JDO stuff. http://www.mail-archive.com/[email protected]/msg06405.html This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
