I have problem with right set configuration of spring-boot, jpa and postgresql database.
All my queries hibernate launch without quotes and in lowercase. Postgresql dont accept this, and return error.
My application.yml file:
spring:
datasource:
url: jdbc:postgresql://127.0.0.1:5432/xxx
username: xxx
password: xxx
driver-class-name: org.postgresql.Driver
dialect: org.hibernate.dialect.PostgreSQL94Dialect
jpa:
show-sql: true
naming-strategy: org.hibernate.cfg.EJB3NamingStrategy
hibernate:
ddl-auto: none
default-schema: madmax
dialect: org.hibernate.dialect.PostgreSQL94Dialect
database-platform: org.hibernate.dialect.PostgreSQL94Dialect
hadoop:
config:
fs.defaultFS: hdfs://192.168.56.104:54310/
Example of enitity:
@Entity
@Table(name="RecommendationItem")
public class RecommendationItem {
And preview of hibernate query log:
Hibernate: select recommenda0_.id as id1_2_ [...] from recommendation_item recommenda0_ where recommenda0_.user_id=?
And error:
SEVERE: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet] with root cause
org.postgresql.util.PSQLException: ERROR: relation "recommendation_item" does not exist
It is possible to config this architecture without renaming all annotation in entities?
relation "recommendation_item" does not exist, you shouldn't have an entityRecommendationItem, it is only a relation, which can be described with annotations.. if you don't want to use annotation, what do you have in mind?