This one time, at band camp, Ross Larner said:

RL>Thanks, Bruce. You're right, initially I tried the JDO stuff by implementing
RL>Persistent in the source generated classes. I will remove that and retry.
RL>
RL>On a related issue, do all of the elements/complex types in my XSD need to
RL>have an identity field in order to work with JDO, or can the mapping file
RL>create an ID field that doesn't exist in the XSD?

Castor JDO needs an id on all objects. Regardless of how the id fields
get there (e.g. SourceGen, manually), each <class> element in the JDO
mapping descriptor will need to have an 'id' attribute.

I'm not sure I answered the question you were asing, however, because
I think you may be speaking about the mapping descripor for Castor XML.

Bruce

RL>----- Original Message -----
RL>From: "Bruce Snyder" <[EMAIL PROTECTED]>
RL>To: "Ross Larner" <[EMAIL PROTECTED]>
RL>Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
RL>Sent: Tuesday, December 17, 2002 3:55 PM
RL>Subject: Re: [castor-dev] Newbie JDO question
RL>
RL>
RL>> This one time, at band camp, Ross Larner said:
RL>>
RL>> RL>RL>I am a fairly new user to Castor, and I have a basic question I hope
RL>someone could
RL>> RL>answer:
RL>> RL>RL>
RL>> RL>RL>is there a way to have Castor autogenerate the Java classes that
RL>implement
RL>> RL>Persistent from an XSD?
RL>> RL>RL>
RL>> RL>RL>For example, the Product.java file that is used in the jdo example -
RL>could this
RL>> RL>type of file be generated from an XSD using the sourceGenerator? It
RL>seems very similar
RL>> RL>to the XML Binding files that are generated by default. I am wondering
RL>if anyone
RL>> RL>autogenerates the JDO code as well, and if so, how?
RL>> RL>RL>
RL>> RL>-------
RL>> RL>BS>Ross,
RL>> RL>
RL>> RL>BS>See Castor XML's SourceGenerator:
RL>> RL>
RL>> RL>BS>    http://www.castor.org/sourcegen.html
RL>> RL>
RL>> RL>BS>It's possible that there may still be some very minor issues with
RL>what
RL>> RL>BS>it generates and whether it's fully compatible with JDO.
RL>> RL>
RL>> RL>BS>Bruce
RL>> RL>
RL>> RL>Bruce, et all,
RL>> RL>I was under the impression that the SourceGenerator only generates
RL>files for use in the XML Data Binding part of Castor, nothing for the JDO
RL>stuff. After reading the link you sent, as well as the pdf doc for the
RL>Source Generator, I didn't find anything to refute that. Is there anything
RL>that autogenerates the JDO code from an XSD, i.e. generating the Java
RL>classes that implement "Persistent"?
RL>>
RL>> Ross,
RL>>
RL>> The Castor XML SourceGenerator generates Java source code to be used
RL>> anywhere. At one time, there were some issues with regard to the
RL>> relationships (or something else maybe, I can't recall exactly) it
RL>> generated and using the generated code with Castor JDO, but I believe
RL>> those issues have since been addressed.
RL>>
RL>> I think that you're under the impression that all of your classes for
RL>> use with Castor JDO must implement the org.exolab.castor.jdo.Persistent
RL>> interface. This is NOT required with Castor. Please see the question,
RL>> 'Should my JDO classes implement some special interface?' here:
RL>>
RL>>     http://www.castor.org/jdo-faq.html#Technical-questions
RL>>
RL>> Bruce
RL>> --
RL>> perl -e 'print
RL>unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
RL>>
RL>>
RL>>
RL>
RL>

-- 
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

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

Reply via email to