Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 2 
Mapping documents:
Table A excerpt
    <set
        name="surficialGeologies"
        lazy="true"
		cascade="none"
		order-by="layer_number asc"
        table="SURFICIAL_GEOL_X_SITE_GEOL"
    >
        <key>
            <column name="SITE_GEOLOGY_ID" />
        </key>
        <many-to-many class="nz.org.geonet.delta.domain.SurficialGeology">
            <column name="SURFICIAL_GEOLOGY_ID" />
        </many-to-many>
    </set>
Full stack trace of any exception that occurs:
JDBC exception on Hibernate data access: could not initialize collection: [nz.org.geonet.delta.domain.SiteGeology.surficialGeologies#294]; nested exception is java.sql.SQLException: ORA-00904: "SURFICIALG0_"."LAYER_NUMBER": invalid identifier
Name and version of the database you are using: Oracle 9
I have a many to many relationship between table A and table B. A table with only foreign keys resolves the many to many relationship. The domain class mapped to table A contains a set of objects mapped to table B (SurficialGeology) . Is it possible to order the set by a property of table B (layer_number) rather than a property of the resolving table?
Read this: 
http://hibernate.org/42.html