在我的应用程序中,我有以下Student
实体:
@Entity
public class Student extends Commenter implements Serializable {
...
@OneToMany
private List<Coupon> coupons;
@OneToMany
private List<Receipt> receipts;
@ManyToMany
private List<Course> courses;
@ManyToMany
private List<Sessions> sessions;
...
}
当我在本地部署应用程序时,一切正常。但是,当我在我们的服务器上部署应用程序时,student_coupon
并student_receipt
没有创建连接表。
我试图删除整个数据库并重新创建所有表,但我不知道为什么从未创建上述 2 个表。不过,其他连接表 (student_sessions
和student_course
) 始终是正确创建的。
如果您能给我一个建议,我将不胜感激。
此致,