Durig运行我的Spring启动应用程序,应用程序在此步骤上停止
org.hibernate.dialect.Dialect:HHH000400:使用方言:org.hibernate.dialect.MySQL5Dialect
接下来什么也没有发生。但是当我删除所有表时,我的MySQL应用程序可以启动。添加调试后,我发现了问题:
2019-07-19 17:26:16.808 DEBUG 9080 --- [main] org.hibernate.SQL:alter table movie添加约束FKfrudmge75x4by1qwvntkcbgvd外键(movie_details_id)引用movie_details(id)
电影类
@OneToOne()
@JoinColumn(name = "movie_details_id")
private MovieDetails movieDetails;
MovieDetails类
@OneToOne(mappedBy = "movieDetails", cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true)
private Movie movie;
这是数据库MySQL的问题