From: Paul S. <pau...@ne...> - 2002-02-14 09:32:28
|
Hi, I found a problem when I had multiple indexes created on the same table, as all the index names are the same. I hacked in a fix that works for me, but I didn't study the code very carefully so I might be way off base. Diff output below. PaulS :) =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/RelationalDatastore.java,v retrieving revision 1.41 diff -w -r1.41 RelationalDatastore.java 221c221,224 < private void initializeOneToManys() throws MappingException { --- > private void initializeOneToManys() throws MappingException > { > int[] tableIndexCounts = new int[ tables.size() ]; > 254c257,260 < indexes.add( collection.createIndex() ); --- > Index idx = collection.createIndex(); > int pos = tables.indexOf( idx.getTable() ); > idx.setName( idx.getName() + tableIndexCounts[pos]++ ); > indexes.add( idx ); |