Hi,
I generated annotated beans with hiberante-tools from an already existing model, with it's contraints etcetera
the debug shows "org.hibernate.tool.hbm2ddl.TableMetadata - foreign keys: fk_foobar" wich means the metadata from the database are understood. However it doesn't prevent hibernate when it's un ddl=update mode to try to create the same constraint but with it's own name.
putting @ForeignKey(name="fk_foobar") on the manyToOne getter seems to prevent hibernate to try to recreate it, but I don't see why hibernate just don't try to create it since it was already able to know there was one to create the bean model.
|