Reputation: 922
When I want make query in Intellij JPA console I get error that relation "topic" does not exist
. Jpql query select t from Topic t
. I'm using spring boot, I added jpa to module, persistence toolbar works well, but jpa console doesn't. My thougs that JPA Console not find in right db schema, but datasource selected corect.
JPA console print: [2019-07-19 12:49:59] [42P01] ERROR: relation "topic" does not exist [2019-07-19 12:49:59] Position: 60
Upvotes: 9
Views: 2376
Reputation: 49
first, New Database and specify schema with jdbc url, such like this:
jdbc:postgresql://www.test.xyz:27017/spring_boot?currentSchema=test
and then, open Persistence window and right-click Assign Data Sources... and assign data source before you register
IDEA Version: IntelliJ IDEA 2024.2 (Ultimate Edition)
Upvotes: 0
Reputation: 922
I found my mistake in connection to database. I had in field Database value postgres
, I replace by chatapp
- it is correct schema, and now it works well
Upvotes: 5