Youcef LAIDANI
Youcef LAIDANI

Reputation: 60046

Intellij IDE show error highlight in Entities

I open a spring boot project in IntelliJ IDEA 2020.1.2 (Ultimate Edition), and I hot many error highlight in entities, like:

But when I open my project in old version like IntelliJ IDEA 2019.3.3 (Community Edition) I don't see this problem.

IntelliJ IDEA 2020.1.2

IntelliJ IDEA 2020.1.2

IntelliJ IDEA 2019.3.3

IntelliJ IDEA 2019.3.3

Any reason for this problem or any fix please?

Upvotes: 1

Views: 975

Answers (3)

Avijit Barua
Avijit Barua

Reputation: 3086

In IntelliJ idea go to

Setting-> Inspections->JPA->Unresolved database reference in annotations-> severity(which is just right)-> change from error to week warnning.

enter image description here

Upvotes: 4

Eduard A
Eduard A

Reputation: 400

Try this one


File -> Project Structure

At left pane select "Facets". If there is no JPA listed, click "+" sign and add "JPA"

At bottom of same dialog, at "Default JPA Provider", select - "Hibernate", press "OK"

If you have error at @Table annotation, configure and choose data source

Table name for select now should be recognized as entity class name


Reference : GintsGints - stackOverFlow userName

Upvotes: 1

OnDemand
OnDemand

Reputation: 377

Try to click File> Invalidate Cache & Restart. This should help

Upvotes: 0

Related Questions