Reputation: 12582
When I annotate a object inside my entity class as following
@ManyToOne
private User creator;
SchemaExport
ends up creating "creator_id" in the entity table. (Which is good). But
alter table Voucher
add constraint FK2DF5CE507B0A07EF
foreign key (creator_id)
references User;
the constraint name is randomly generated string. Which changers. Is there any annotation where I can set this constraint name ? (if there is such way I would like to know both annotation and hbm.xml configuration)
Upvotes: 0
Views: 2311