Hello,
is there possibility how to change foreign key names apart from @ForeignKey annotation? @ForeignKey is good solution but not for this case:
Code:
public class BussinesValue {
@ManyToOne(optional = false)
@JoinColumn(name = "avail_level_id", nullable = false)
@ForeignKey(name = "avail_level_fk")
private AvailabilityLevel availability;
...
}
Code:
public class Asset {
@Embedded
private BussinesValue value;
...
}
Code:
public class AssetGroup {
@Embedded
private BussinesValue value;
...
}
Then will be duplicate foreign key names in database...
I use Hibernate 3.3.1 with JPA.
Thank you in advance,
PETER