0

Why do I need to configure the SQL dialect of a data source? argues that one must define the hibernate.dialect.

But, if hiberate.dialect is defined within persistence.xml, I have to decide at build time, which database is to be used. What can be done to defer the decision until deployment time.

The goal is to provide a war file without knowing the database in advance.

Frank Neblung
  • 3,047
  • 17
  • 34
  • See [this answer](https://stackoverflow.com/questions/24176024/how-to-include-properties-from-external-file-to-hibernate-cfg-xml) – Essex Boy Oct 24 '17 at 07:23
  • Doesn't hibernate detect the necessary dialect on its own if you leave out the property? –  Oct 24 '17 at 07:24
  • @a_horse_with_no_name No, Hibernate will not deploy properly if you do not set a dialect – Jeff Wang Dec 06 '17 at 18:35

0 Answers0