|
[
Permalink
| « Hide
]
Gavin King added a comment - 27/Nov/03 09:21 PM
Christian, you now own SchemaUpdate ;)
Actually, Hibernate creates the tables as the hbm.xml. So, if hbm.xml tells that table name is "Animal", Hibernate will create a table named "Animal". If you change "Animal" to "ANIMAL", another table will be created.
To retrieve the tables that is equalsIgnoreCase to the table in hbm.xml, the tablePattern parameter in meta.getTables must be "%". It retrieves ALL tables in the selected database, so, the compare can be done by Hibernate. But i guess that if MySQL is case sensitive, the user MUST know that and remove manually the old tables. Otherwise, Hibernate can remove wrong table, removing user's data. CVS COMMIT LOG:
SUBJECT: [Hibernate-commits] Hibernate3/src/org/hibernate/tool/hbm2ddl ColumnMetadata.java,1.1,1.2 DatabaseMetadata.java,1.1,1.2 ForeignKeyMetadata.java,1.1,1.2 IndexMetadata.java,1.1,1.2 TableMetadata.java,1.1,1.2 fixed problems with SchemaUpdate (after all this time) CVS COMMIT LOG:
SUBJECT: [Hibernate-commits] Hibernate2/src/net/sf/hibernate/tool/hbm2ddl ColumnMetadata.java,1.4,1.5 DatabaseMetadata.java,1.4,1.5 ForeignKeyMetadata.java,1.4,1.5 IndexMetadata.java,1.4,1.5 TableMetadata.java,1.6,1.7 fixed problems with SchemaUpdate (after all this time) |
|||||||||||||||||||||||||||||||||||||||||||||||