Jessica, Feel free to ask any kind of question you feel like asking. It might happen, occasionally, that you'll get back a stupid reply ... Which I'd gracefully ignore if I wwere you.
Regards Werner PS Just as a follow up to the email below, this problem you encountered could have been addressed in anotehr way as well. When writing up e.g. A mapping file, makse sure you include either a DOCTYPE definition or a reference to the XML Schema instance of the mapping file. Any useful XML editor as a result of this woulöd have warned you that name is not a valid attribute of the map-to element (is it ?). > -----Original Message----- > From: Jessica Perry Hekman [mailto:[EMAIL PROTECTED] > Sent: Mittwoch, 09. November 2005 00:33 > To: [email protected] > Subject: Re: [castor-user] auto-naming issues > > This list is really good at not yelling at people who ask > stupid questions. I will attempt not to take that as license > to continue to ask them. > > Thanks :) > > Jessica > > On Tue, Nov 08, 2005 at 09:10:22PM +0100, Werner Guttmann wrote: > > Jessica, > > > > replace the <map-to> element in the class mapping for > FreePricing (and > > elsewhere) with > > > > <map-to xml="freePricing"/> > > > > and you should be fine. > > > > Regards > > Werner > > > > Jessica Perry Hekman wrote: > > > Thanks to this list I am now using the following XML: > > > > > > <field name="pricing" > > > type="com.ingenta.ics.ecommerce.api.item.Pricing"> > > > <bind-xml auto-naming="deriveByClass" node="element" /> > > > </field> > > > > > > <class name="com.ingenta.ics.ecommerce.api.item.Pricing" > > > verify-constructible="false"> > > > <description>Mapping for Pricing</description> > > > <map-to name="pricing"/> > > > </class> > > > > > > <class name="com.ingenta.ics.ecommerce.api.item.FreePricing" > > > extends="com.ingenta.ics.ecommerce.api.item.Pricing"> > > > <description>Mapping for FreePricing</description> > > > <map-to name="freePricing"/> > > > <field name="id" type="com.ingenta.ics.item.Id"/> > > > <field name="scheduleId" type="com.ingenta.ics.item.Id"/> > > > <field name="taxCode" type="string"/> > > > </class> > > > > > > I created one of the objects in question such that getPricing() > > > would return a FreePricing. Castor, when asked to marshall this > > > beast, gave me > > > > > > <free-pricing/> > > > > > > which implies to me that I am defining the FreePricing class rule > > > incorrectly somehow, since I expected it to give me > <freePricing/>. > > > > > > When I give it a file to unmarshall, including > <freePricing/> in the > > > relevant spot, it complains > > > > > > unable to find FieldDescriptor for 'freePricing' in > ClassDescriptor > > > > > > which seems reasonable if in fact it thinks that object > is bound to > > > the "free-pricing" element. > > > > > > Does anyone know what I'm doing wrong? > > > > > > Thanks in advance, > > > Jessica > > > > > > > > > ------------------------------------------------- > > > If you wish to unsubscribe from this list, please send an empty > > > message to the following address: > > > > > > [EMAIL PROTECTED] > > > ------------------------------------------------- > > > > > > > > > > > > ------------------------------------------------- > > If you wish to unsubscribe from this list, please send an empty > > message to the following address: > > > > [EMAIL PROTECTED] > > ------------------------------------------------- > > > > ------------------------------------------------- > If you wish to unsubscribe from this list, please send an > empty message to the following address: > > [EMAIL PROTECTED] > ------------------------------------------------- > > > ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

