I would like to be able to assign the name of a foreign key for a primary key used as a reference to another primary key. For example,
Code:
class Bar
{
@OneToOne(optional = false)
@PrimaryKeyJoinColumn()
private Foo foo;
...
}
Even when using @ForeignKey, the following DDL is generated
Code:
alter table bar
add index FK4219F470CA9026D (bar_id),
add constraint FK4219F470CA9026D
foreign key (bar_id)
references bar (foo_id);
Is there a way to change the name of the foreign key from FK4219F470CA9026D to Fk_Bar_Foo, for example?