Unfortunately, this is not the case.
Even Hibernate 5 seems to generate the constraint name here:
Code:
Constraint.generateName(String, Table, Column...) line: 57
StandardTableExporter.getSqlCreateStrings(Table, Metadata) line: 113
StandardTableExporter.getSqlCreateStrings(Exportable, Metadata) line: 30
SchemaCreatorImpl.doCreation(Metadata, boolean, Dialect, Target...) line: 230
SchemaCreatorImpl.doCreation(Metadata, boolean, Target...) line: 128
SchemaExport.<init>(ConnectionHelper, ServiceRegistry, MetadataImplementor, boolean) line: 199
SchemaExport.<init>(ServiceRegistry, MetadataImplementor, boolean) line: 140
SessionFactoryImpl.<init>(MetadataImplementor, SessionFactoryOptions) line: 465
SessionFactoryBuilderImpl.build() line: 444
Configuration.buildSessionFactory(ServiceRegistry) line: 708
...
Stacktrace is for version 5.0.10.
So according to your own expectations, this seems to be an oversight?
With regard to using hbm2ddl vs. FlywayDB:
When developers create a new test DB we currently use the schema generated by Hibernate.
Also for testing with in-memory DB we use this feature.
Obviously, the generated schema should be identical to the existing PROD schema.