Intellij Cannot resolves table "...."

Asked

Viewed 135 times

-1

All right? I have a question. I am creating an API with Spring Boot and Springdata, Hibernate, while trying to resolve a relationship Manytomany Intellij displayed an error

Cannot resolve table [tableName]

I searched the forums for some possible solutions, add the H2 database (the database I’m using) and defined assing data source but without success. Can someone give me a help please.

Note: No settings >> inspections I altered to display an alert.

inserir a descrição da imagem aqui

1 answer

1

That’s not really a mistake, it’s more of an intellij warning. If you use the Ultimate version, the IDE can connect to the database you use and (among other things) check if the names you pass in annotations like @Table and @Column are valid.

If you use H2 from Spring Boot, try to raise the API and keep it on as a program, so Intellij can communicate with DB to do the validation correctly, or turn off the Database Connection extension to prevent this.

Example of the normal extension behavior, when connected to my local Postgres database, while hovering over a table name:
Exemplo de como o IntelliJ se comporta com a conexão configurada corretamente

  • I got it, man. I was banging my head here thinking my code wouldn’t go up. Thanks for the answer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.