0

I am mapping entity class columns with my database columns by using @Column annotation. But it is showing error message.

Cannot resolve column 'name'

enter image description here

Vikram Shekhawat
  • 627
  • 2
  • 8
  • 12
  • 1
    Are you sure that you have the `javax.persistence-api.jar` in your classpath? – SternK Jul 25 '20 at 12:39
  • 1
    if you connect the db as datasource to intellij, the error will go away, see [JPA Cannot resolve column/IntelliJ](https://stackoverflow.com/questions/29155350/jpa-cannot-resolve-column-intellij). otherwise you could also [disable the inspection](https://stackoverflow.com/a/59258612/13527856) – MarcoLucidi Jul 25 '20 at 13:15

1 Answers1

0

You can disable it in IntelliJ. File -> settings -> Editor -> Inspections -> uncheck the "Unresolved database references in annotations"

Second option is connect your database with IntelliJ. View -> Window tool -> Database -> and add your data source.

Seldo97
  • 611
  • 1
  • 8
  • 17