IT 지식 창고

(Hibernate) SQLite Dialect Error

casim 2024. 8. 24. 09:25

Hibernate 6.x 미만 버전에서는 공식적으로 SQLite dialect를 지원하지 않습니다.

단, github에서 미만 버전에서 사용할 수 있도록 오픈소스형태로 공개한 repository가 있습니다.

 

Hibernate 3:

https://github.com/kemitix/sqlite-dialect

<dependency>
    <groupId>net.kemitix</groupId>
    <artifactId>sqlite-dialect</artifactId>
    <version>0.1.0</version>
</dependency>

Hibernate configuration:

hibernate.dialect = org.hibernate.dialect.SQLiteDialect

Hibernate 4:

https://github.com/EnigmaBridge/hibernate4-sqlite-dialect

<dependency>
    <groupId>com.enigmabridge</groupId>
    <artifactId>hibernate4-sqlite-dialect</artifactId>
    <version>0.1.2</version>
</dependency>

Hibernate configuration:

hibernate.dialect = com.enigmabridge.hibernate.dialect.SQLiteDialect

Note: I am author of this repository. Based on the gwenn repo.

Hibernate 5:

https://github.com/gwenn/sqlite-dialect/

Author worked with Hibernate team to integrate it to the Hibernate directly. It is tracked in this issue.

Add this dependency:

    <dependency>
        <groupId>com.github.gwenn</groupId>
        <artifactId>sqlite-dialect</artifactId>
        <version>0.1.2</version>
    </dependency>

Hibernate configuration:

hibernate.dialect = org.sqlite.hibernate.dialect.SQLiteDialect

 

참고 링크 : https://stackoverflow.com/questions/17587753/does-hibernate-fully-support-sqlite

 

Does Hibernate Fully Support SQLite?

Jboss Hibernate doesn't say anything about the support for SQLite in its wiki. And the same is mentioned in this Stack Overflow post: Hibernate+SQLite+Netbeans Can you please highlight about this? ...

stackoverflow.com