[ http://jira.andromda.org/browse/HIB-94?page=history ] Work on HIB-94 started by Carlos Cuenca
> Problem with indexed-collection (list) and schema generation > ------------------------------------------------------------ > > Key: HIB-94 > URL: http://jira.andromda.org/browse/HIB-94 > Project: Hibernate Cartridge > Type: Bug > Versions: 3.0 RC2 > Reporter: Markus Glagla > Assignee: Carlos Cuenca > > I've modelled two classes with a one-to-many-association and the collection > type "list" between them. The property containing the collection index is > named "position", the corresponding column is named "POSITION". > When using an indexed collection you have to provide the property-name (e.g. > "position") of the index-property in the tagged-value > @andromda.hibernate.collection.index (though the documentation talks about > the column containing the index). > Using the default-template the generated hbm.xml-file for the one-side > contains: > <list name="subelements" ...> > <key foreign-key="..."> > <column name="..."/> > </key> > <index column="position"/> > <one-to-many class="..."/> > </list> > As you can see, instead of the index column expected by Hibernate, the > corresponding property is generated into the mapping file. When using the > hbm2ddl-Tool two columns will be generated: position (for the index-column > defined on the one-side) and POSITION (for the property on the many-side). ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf