enter image description hereI'm using Hibernate to Auto Create a Table on pgAdmin. -The log is not showing any errors -It is recognizing the existence of the db since i get an error if i delete it -Im using dll-auto: update
I'm trying to auto create a table using Hibernate on pgadmin. Code is giving no errors but the table is not being created
CodePudding user response:
since you didn't provide any info about your code, I'm considerng that from code point of view every thing is fine. please check below Items:
- Do u checking the right data base instance? if you use IntelliJ, use Database panel to check.
- you can use below properties to check SQL commands execution in microservice logs:
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.show_sql=true
logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
CodePudding user response:
PostgreSQLDialect
is deprecated (please refer here)
Please use PostgreSQL82Dialect
or PostgreSQL92Dialect
based on your postgres version.
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQL82Dialect
spring.jpa.hibernate.ddl-auto=update
spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.url=jdbc:postgres://localhost:5432/customer
spring.datasource.username=<username>
spring.datasource.password=<password>