42

I have a custom dialect to set for Hibernate in SpringBoot. The dialect is for Gemfire. The instructions are for XML-based config.

However, I am using SpringBoot and I cannot figure out how to set this property.

The dialect is com.pivotal.gemfirexd.hibernate.GemFireXDDialect

Saikat
  • 14,222
  • 20
  • 104
  • 125
Jason
  • 2,006
  • 3
  • 21
  • 36

4 Answers4

91

In application.properties

spring.jpa.properties.hibernate.dialect = com.pivotal.gemfirexd.hibernate.GemFireXDDialect
mate00
  • 2,727
  • 5
  • 26
  • 34
Alex Fernandez
  • 1,892
  • 14
  • 17
  • I am using `spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL10Dialect`, but Hibernate ignores it, does not invoke `org.hibernate.boot.model.naming.Identifier.render(Dialect)`, and instead invokes `org.hibernate.boot.model.naming.Identifier.render()`, so I am getting ticks in place of double quotes. – Cardinal System Apr 09 '21 at 21:08
25

You can use this approach as well:

spring.jpa.database-platform=com.pivotal.gemfirexd.hibernate.GemFireXDDialect
niemmi
  • 17,113
  • 7
  • 35
  • 42
Errol Carrasco
  • 261
  • 3
  • 3
10

Yet another way to set the dialect is via the spring.jpa.database property using a short DB name (case insensitive) as defined in the db vendors list. For example:

spring.jpa.database=postgresql
roj
  • 1,262
  • 13
  • 27
1

we can use this for activating oracle 10 g dialect

spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect
General Grievance
  • 4,555
  • 31
  • 31
  • 45