DefaultComponentSafeNamingStrategy is incompatible with @ElementCollection of @Embeddable objects.
Given the following classes
and DefaultComponentSafeNamingStrategy as a naming strategy, Hibernate generates the schema with the following incorrect table:
create table Foo_bars (Foo_id bigint not null, bars_collection&&element_name varchar(255))
.collection&&element. is an internal placeholder that should be removed before use of property name. Other naming strategies effectively remove it by using the part of property name after the last ., but DefaultComponentSafeNamingStrategy doesn't, it just replaces . with _.
Here is a workaround: