I solved this problem by adding JavaEE Persistence
framework support. Just right click on the project, select Add Framework Support
and then scroll down to find the JavaEE Persistence
, then enable the checkbox and hit OK:
Adding JavaEE Persistence Facet
It will add a persistence.xml
file, you can delete it. Finally your auto completions will be back:
Moment of truth
Update You can also enable JPA
facet in the Project Structure
. First, press Ctrl Alt Shift S
or go to Files > Project Structure
. Hit the Add
button and in the menu, then select JPA
:
Adding JPA Facet
And finally hit OK
.