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?

Thanks in advance,

Rick

--
*Rick Mangi*
*Director of Software Development*
*Bootstrap Software ( www.bootsoft.com )*
408 West 14th Street, 2nd Floor / NY / NY 10014-1002
212.871.2020 ext 118 (desk) / 917.848.3619 (cell)
603.308.1252 (fax) / AIM: dotThink / Yahoo: rmangi



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

Reply via email to