It works fine on runing project with auto-ddl=create, and it generates the SQL correctly:
CREATE INDEX fk_parent_child on child(paretn_id);
But running the plugin with default settings with only packages setting added, I get an error :
Failed to execute goal com.devskiller.jpa2ddl:jpa2ddl-maven-plugin:0.9.12:generate (default-cli) on project Foobaa: Unable to create index (parent_id) on table Parent: database column 'parent_id' not found. Make sure that you use the correct column name which depends on the naming strategy in use (it may not be the same as the property name in the entity, especially for relational types)
@Entity
public class Parent {
...
@ElementCollection
@JoinColumn
@OnDelete(action = OnDeleteAction.CASCADE)
@CollectionTable(indexes = {@Index(name = "fk_parent_child", columnList = "parent_id")})
public final Set<Child> owners = new HashSet<>();
It works fine on runing project with auto-ddl=create, and it generates the SQL correctly:
CREATE INDEX fk_parent_child on child(paretn_id);
But running the plugin with default settings with only packages setting added, I get an error :
Failed to execute goal com.devskiller.jpa2ddl:jpa2ddl-maven-plugin:0.9.12:generate (default-cli) on project Foobaa: Unable to create index (parent_id) on table Parent: database column 'parent_id' not found. Make sure that you use the correct column name which depends on the naming strategy in use (it may not be the same as the property name in the entity, especially for relational types)