Commit aad7d7b1c65095ec81c8c23da2b805b9410e6131

Authored by hausdoerfer
1 parent e02720c5

extension for postgres sql dialect added

services/Global/src/main/java/de/bht/beuthbot/persistence/ExtendedPostgreSQLDialect.java 0 → 100644
  1 +package de.bht.beuthbot.persistence;
  2 +
  3 +import org.hibernate.dialect.PostgreSQLDialect;
  4 +
  5 +import java.sql.Types;
  6 +
  7 +public class ExtendedPostgreSQLDialect extends PostgreSQLDialect {
  8 +
  9 + public ExtendedPostgreSQLDialect(){
  10 + super();
  11 + registerHibernateType(Types.JAVA_OBJECT, "json");
  12 +
  13 + }
  14 +}
0 15 \ No newline at end of file
... ...
services/Global/src/main/resources/META-INF/persistence.xml
... ... @@ -14,7 +14,8 @@
14 14  
15 15 <properties>
16 16  
17   - <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/> <!-- DB Dialect -->
  17 + <!--<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>--> <!-- DB Dialect -->
  18 + <property name="hibernate.dialect" value="de.bht.beuthbot.persistence.ExtendedPostgreSQLDialect"/>
18 19 <property name="hibernate.hbm2ddl.auto" value="create-drop" /> <!-- create / create-drop / update / none -->
19 20 <property name="hibernate.archive.autodetection" value="class"/>
20 21  
... ...