1

I use hibernate. I need to set the current schema somewhere other than in the @Table annotation or in jdbc:postgresql://HOST:PORT/ in application.yml Tell me where else you can install the schema?

spring.jpa.properties.hibernate.default_schema: contact does not see the setting

devoid
  • 11
  • 3
  • It looks like like you are not only using Hibernate but also a SpringBoot. Could you confirm on that? – Michal Jul 06 '22 at 14:05
  • Does this answer your question? https://stackoverflow.com/questions/24278659/change-database-schema-used-by-spring-boot – Forketyfork Jul 06 '22 at 14:06
  • @Michal Yes, I using SpringBoot – devoid Jul 06 '22 at 14:43
  • @Sergei No. I tried to establish default_schema with help spring: jpa: properties: hibernate: default_schema , but the setting does not seem to be read and there is no reaction – devoid Jul 06 '22 at 14:48
  • The YML file is so easy to get wrong. Could you - just for the sake of the experiment- try to set the property in other way then via the application.yml? For example, passing it per -D switch at start? Also remove all the other settings, i.e. yml and @Table and so on. – Michal Jul 07 '22 at 09:55

1 Answers1

0

In application.yml

spring: datasource: hikari: schema: nameSchema

devoid
  • 11
  • 3
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 11 '22 at 13:25