The field-descriptor element has the following comments in the repository.dtd: <b>The id attribute is optional.</b> If not specified, OJB internally sorts field-descriptors according to their order of appearance in the repository file. If a different sort order is intended the id attribute may be used to hold a unique number identifying the decriptors position in the sequence of field-descriptors. The order of the numbers for the field-descriptors must correspond to the order of columns in the mapped table.
I assume the comments refer to the order in which objects are sorted once retrieved from the database. Do the comments apply at all for ODMG? Applying a simple 'select objects from Some.class' results in all the objects being sorted by id. The order of the fields or providing id attributes on each field demonstrated no change in sort order. Here's an excerpt of the field decriptors: Without ids <field-descriptor name="lastName" column="last_name" jdbc-type="VARCHAR"/> <field-descriptor name="firstName" column="first_name" jdbc-type="VARCHAR"/> <field-descriptor name="email" column="email" jdbc-type="VARCHAR"/> <field-descriptor name="id" column="user_id" jdbc-type="INTEGER" primarykey="true" autoincrement="true"/> With ids <field-descriptor id="0" name="lastName" column="last_name" jdbc-type="VARCHAR"/> <field-descriptor id="1" name="firstName" column="first_name" jdbc-type="VARCHAR"/> <field-descriptor id="2" name="email" column="email" jdbc-type="VARCHAR"/> <field-descriptor id="3" name="id" column="user_id" jdbc-type="INTEGER" primarykey="true" autoincrement="true"/> DISCLAIMER: The information contained in this e-mail is, unless otherwise indicated, confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.
