package org.jhipster.health.domain.util; import org.hibernate.dialect.PostgreSQL82Dialect; import org.hibernate.type.descriptor.sql.BinaryTypeDescriptor; import org.hibernate.type.descriptor.sql.SqlTypeDescriptor; import java.sql.Types; public class FixedPostgreSQL82Dialect extends PostgreSQL82Dialect { public FixedPostgreSQL82Dialect() { super(); registerColumnType(Types.BLOB, "bytea"); } @Override public SqlTypeDescriptor remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor) { if (sqlTypeDescriptor.getSqlType() == java.sql.Types.BLOB) { return BinaryTypeDescriptor.INSTANCE; } return super.remapSqlTypeDescriptor(sqlTypeDescriptor); } }