On Mon, 03 Jan 2005 16:36:57 -0500, Rick Mangi <[EMAIL PROTECTED]> wrote:
> 
> Hey all, sorry if this is a newbie question. I've been using castor for
> a couple of weeks now and I like it a lot. I'm working with a very big
> XML Schema which I just ran through the code generation engine. The goal
> is to suck XML files in via Castor and then use Hibernate to put the
> data into oracle (ya, I know, but we already use hibernate, and it works).
> 
> The XML schema I'm using is big, and it generated a few hundred classes.
> That's fine. But what is confusing me is the "Item" classes. For
> example, this snippet:
> 
> <xs:element name="RETS">
>        <xs:complexType>
>            <xs:sequence minOccurs="0" maxOccurs="unbounded">
>                <xs:element ref="REData"/>
>            </xs:sequence>
>        </xs:complexType>
>    </xs:element>
>    <xs:element name="REData">
>        <xs:complexType>
>            <xs:sequence>
>                <xs:element ref="REProperties" minOccurs="0"/>
>                <xs:element ref="REOffices" minOccurs="0"/>
>                <xs:element ref="REAgents" minOccurs="0"/>
>                <xs:element ref="REOfficeRosters" minOccurs="0"/>
>                <xs:element ref="REProspects" minOccurs="0"/>
>                <xs:element ref="REActivities" minOccurs="0"/>
>                <xs:element ref="REHistories" minOccurs="0"/>
>                <xs:element ref="REPublicRecords" minOccurs="0"/>
>            </xs:sequence>
>        </xs:complexType>
>    </xs:element>
> 
> Generated (among others) a mapping class RETSItem.java which seems to
> just be a wrapper around the of REData objects. I'm not sure why this
> collection isn't just a part of the RETS.java object. RETS.java is now
> holding a collection of REItems which just has a single private field,
> _REData.
> 
> There are literally dozens of these classes generated, and they seem to
> serve no real purpose. I'm sure it makes the code generation easier, but
> its going to make mapping to the database a nightmare.
> 
> is there any way to turn off this holder-class generation?

Rick, 

I would like to take a look at the XSD you're feeding to the Source
Generator. Could you please post it to the list? If not, please send
it to me directly.

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://geronimo.apache.org/



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

Reply via email to