我正在开发基于 Spring Framework、MySQL、JPA 的 Java Web 应用程序。我在尝试将数据从 HTML 表单持久化到 SQL 数据库时遇到问题,然后我尝试调试和修复。我正在使用 IntelliJ IDEA Ultimate 2017.1。我发现错误:
Cannot resolve column 'product_name' This inspection controls whether the Persistence ORM annotations are checked against configured Datasources
如何解决?
最佳答案
对于只想禁用此检查的用户,请转到
Intellij IDEA -> Preferences -> Search "Unresolved database references in annotations"并取消勾选。
(macOS Mojave 和 Intellij Ultimate 2019.3)
这将禁用检查并删除 @Column
注释上的所有“无法解析列...”错误。 Intellij 将停止检查数据库表中是否存在 String 列名称。风险自负。
关于mysql - 如何修复错误 "Cannot resolve column...",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43739438/