Answer the question
In order to leave comments, you need to log in
How to configure Hibernate to correctly create a type in a table?
A BIGINT FK Coupon_Title is created in the company_coupons table on Coupon , THEN HOW a VARCHAR Coupon_Title is created in the Coupons table
.
@OneToMany
@JoinTable(name = "company_coupons" , joinColumns = @JoinColumn(name = "COMPANY_ID") , inverseJoinColumns = {@JoinColumn(name = "COUPON_ID"), @JoinColumn(name = "COUPON_TITLE")})
private Collection<Coupon> company_coupons;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question