In Hibernate, to specify a column for joining association, @JoinColumn annotation in used, for example like this:
@ManyToOne
@JoinColumn(name="address_id")
public Address getAddress() {
return address;
}
In most cases, name of the column is snaked-cased class name plus _id
. So it is reasonable to expect from Hibernate to derive it automatically (as it is done, for example, in Django's ORM). But is such behavior implemented somehow?