HI~I'm finded mistake in Hibernate Annotation Reference.
http://www.hibernate.org/hib_docs/annot ... ml#d0e1136
Code:
@Entity()
public class Flight implements Serializable {
@ManyToOne( cascade = {CascadeType.PERSIST, CascadeType.MERGE} )
@JoinTable(name="Flight_Company",
joinColumns = @JoinColumn(name="FLIGHT_ID"),
inverseJoinColumns = @JoinColumns(name="COMP_ID")
)
public Company getCompany() {
return company;
}
...
}
In Reference, Next code is incorrectness.
inverseJoinColumns = @JoinColumns(name="COMP_ID")
@JoinColumns annotation require array of @JoinColum. There is not directly used @JoinColumns annotation.(Maybe use, but more difficult)
I think to change this position.
inverseJoinColumns = {@JoinColumn(name = "COMP_ID")}
This code is my thinking, hence another possible.
thank you to response.