hibernate报错:JoinColumn cannot be resolved to a type
程序员文章站
2022-04-25 21:27:22
...
添加多对多关系时(如下)报错:JoinColumn cannot be resolved to a type
@ManyToMany(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
@JoinTable(name ="course",
joinColumns = {@JoinColumn(name = "preplan_sn", referencedColumnName = "preplan_sn")},
inverseJoinColumns = {@JoinColumn(name = "domain_sn", referencedColumnName ="domain_sn")})
这里需要导入一个包的
import javax.persistence.JoinColumn;
但是他不提示要导入这个是要手动导入的。
上一篇: Spring_AOP
推荐阅读
-
JSP报错javax.servlet.jsp.JspException cannot be resolved to a type solution
-
javax.servlet.jsp.PageContext cannot be resolved to a type
-
javax.servlet.jsp.PageContext cannot be resolved to a type
-
MyBatis Generator报错:Cannot instantiate object of type(问题解决)
-
Hibernate项目报错:Cannot call sendError() after the response has been committed
-
使用eclipse写JAVA出现xxx cannot be resolved to a type错误的解决方法详解
-
使用eclipse写JAVA出现xxx cannot be resolved to a type错误的解决方法详解
-
JSP报错javax.servlet.jsp.JspException cannot be resolved to a type solution
-
javaweb eclipse 出现 xxx cannot be resolved to a type 错误解决方法
-
SpringBoot启动报错Cannot determine embedded database driver class for database type NONE