Hibernate
Hibernate#
Altibase provides nonstandard SQL while Hibernate facilitates such provision of Altibase as supporting Dialect class. In order to interlock Altibase, the Altibase JDBC Driver should be configured and AltibaseDialect.class should be specified as well into configuration under Hibernate.
AltibaseDialect#
Official Support Starting From Hibernate 6.4#
Starting from Hibernate 6.4, AltibaseDialect is included in the Hibernate ORM package. Now, to use AltibaseDialect, users just need to add Maven dependencies configuration.
Before Hibernate 6.4#
In versions of Hibernate before 6.4, as AltibaseDialect is not included, it is necessary to directly specify AltibaseDialect.class. To achieve this, users need to compile the AltibaseDialect.java file provided by Altibase (including AltibaseLimitHandler.java if necessary) and port it to the files provided by Hibernate. The AltibaseDialect.java file and the AltibaseLimitHandler.java file are Available from the Altibase Github site. For detailed instructions on how to port AltibaseDialect, please refer to How to port AltibaseDialect.
Maven Dependencies Configuration#
Add AltibaseDialect Dependency#
Starting from Hibernate 6.4, the AltibaseDialect has been added to hibernate-community-dialect. Add the dependency as follows:
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-community-dialects</artifactId>
<version>6.4.1.Final</version>
</dependency>
Add Altibase JDBC Driver Dependency#
From patch version Altibase 7.3.0.0.2, the Altibase JDBC driver can be downloaded from the Maven Central Repository. Add to Altibase JDBC driver dependency as follows:
<dependency>
<groupId>com.altibase</groupId>
<artifactId>altibase-jdbc</artifactId>
<version>7.3.0.0.2</version>
</dependency>
Lob Related Connection Attribute#
In Altibase 7.1, ResultSet.getBlob() and ResultSet.getClob() return lob object when the lob column value is null. Because of this, it was necessary to set the lob_null_select connection attribute to "off" explicitly. However, Altibase 7.3 and above versions users are allowed to skip this step because the default value of this has been changed to "off".