Hibernate: Annotation for join column custom column name

April 4th, 2010 by jeremychone
    @ManyToOne
    @JoinColumn(name = "company_id")
    public Company getCompany() {
        return company;
    }

Note that in this particular example, the @JoinColumn is optional since “company_id” is the hibernate default for getCompany

Leave a Reply