How do I stop IntelliJ from marking EJB3 @Table, @Column (etc) as errors?
I want to use the EJB3 @Table, @Column, @JoinColumn (etc) annotations to name database tables and columns as I wish.
In IntelliJ (6.0.4) this is marked as an error ("Cannot resolve symbol"):
I understand that I can create an IntelliJ data source ("Tools"->"Data sources...") and then these errors disappears, but only if my "name" attribute is corresponding to the column name in the database.
I want to be able to write what ever column/table name I want, without IntelliJ complaining and be able to compile the code. Is there a way to do this?
I have tried to remove the "Data source ORM Annotations Problems", but this seems to have no effect what so ever.
/Erik
请先登录再写评论。
Seems like no javaee.jar in module classpath
Erik Tjernlund wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
I'm not sure, but I don't think so. It's (javaee.jar) is in the classpath.
As I said, the "Cannot resolve symbol"-error disappears, if I add a data source to IntelliJ and write the exact same name of the table/column as I already have in the actual database.
But that's not what I want. I want to be able to name the table/column to what ever I want, without IntelliJ making it impossible to compile the code base.
/Erik
What do you mean by "remove"? I usually click on the right-arrow that appears in the drop down when you click on the lightbulb in the editor, then choose to either disable the inspection or open the settings and set the level to "info".
I mean I removed the "Data source ORM Annotations Problems" inspection ("Settings" -> "Errors" -> "Java EE issues" -> "DataSource ORM Annotations Problems").
/Erik
Are you sure you did that in the correct profile?
It's a little awkward to see which profile Idea actually uses:
Even though there's a node for "Project Default", when you click on the parent node "Project Profiles" you might see that the "Default Project Profile" isn't the profile "Project Default", but "]]>", which means you have to click on "IDE Profiles" to see that actually "Default" is the project's default profile.
See?
Yes! Thank you Stephen, that was it. I didn't understand the inspection dialog properly, but now it works perfectly. Great!
Regards,
Erik