Each time I make a JPA project Eclipse reports that there are errors in my project but I do not understand why it does so. I added image and errors below:
Description Resource Path Location Type Column "id" cannot be resolved on table "page" Page.java /BreakpointJPA/src/no/breakpoint/domain line 14 JPA Problem
Description Resource Path Location Type Column "title" cannot be resolved on table "page" Page.java /BreakpointJPA/src/no/breakpoint/domain line 18 JPA Problem
Description Resource Path Location Type Primary key join column "id" cannot be resolved on table "page" Page.java /BreakpointJPA/src/no/breakpoint/domain line 10 JPA Problem
From the main menu, select Window > Show view > Other. Then select General > Error Log. The error log is displayed, showing the following information for each error: The status of the error (for example, error or warning)
I've had the same problem, the solution for me was to refresh the database connection.
Open the JPA view, find the data source explorer. There you open Database Connection, connect with your database, hit refresh. Then make some changes in your file and save it, i added an @Column(name = "") annotation to my id field. After that the error message was gone, and i ereased the Column annotation.
The Problem seems to be that eclipse reads the database tables after establishing the first connection, after that the connection is closed. So if you, like i did, made some changes after this first connection in your database, like changing the field name from foo_id to just id, eclipse didn't know that and comes with this error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With