title: Does Hibernate Support Postgres 9.2 Json Data Type?
body: <p>It looks like Hibernate does not support Postgres Json datatype. </p>
  
  <p>I am getting the following error:</p>
  
  <p><code>javax.persistence.PersistenceException: org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111</code></p>
  
  <p><strong>Configuration:</strong></p>
  
  <pre><code>&lt;bean id="entityManagerFactory"
          class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
          &lt;property name="dataSource" ref="PGDataSource" /&gt;
          &lt;property name="jpaVendorAdapter"&gt;
              &lt;bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"&gt;
                  &lt;property name="showSql" value="true" /&gt;
                  &lt;property name="generateDdl" value="true" /&gt;
                  &lt;property name="databasePlatform" value="org.hibernate.dialect.PostgreSQLDialect" /&gt;
              &lt;/bean&gt;
          &lt;/property&gt;         
      &lt;/bean&gt;
  </code></pre>
  
  <p><strong>Java Code:</strong></p>
  
  <pre><code>query = "select row_to_json(row) from ( " + query + ") row";
  
  EntityManager em = emf.createEntityManager();
  
  List resultList = em.createNativeQuery(query).getResultList();
  System.out.println("resultList " + resultList +  " resultList " + resultList.getClass());
  </code></pre>
  
  <p>Let me know if there are any workarounds.</p>