j256 / ormlite-core

Core ORMLite functionality that provides a lite Java ORM in conjunction with ormlite-jdbc or ormlite-android
http://ormlite.com/
ISC License
578 stars 213 forks source link

H2 driver doesn't handle UUID_NATIVE fields, but it should #296

Open lultimouomo opened 6 months ago

lultimouomo commented 6 months ago

H2 is capable of handling UUIDs natively, but usingDataType.UUID_NATIVE results in:

    java.lang.UnsupportedOperationException: UUID is not supported by this database type
        at com.j256.ormlite.db.BaseDatabaseType.appendUuidNativeType(BaseDatabaseType.java:201)
        at com.j256.ormlite.db.BaseDatabaseType.appendColumnArg(BaseDatabaseType.java:137)
        at com.j256.ormlite.table.TableUtils.addCreateTableStatements(TableUtils.java:488)
        at com.j256.ormlite.table.TableUtils.doCreateTable(TableUtils.java:368)
        at com.j256.ormlite.table.TableUtils.doCreateTable(TableUtils.java:356)
        at com.j256.ormlite.table.TableUtils.createTableIfNotExists(TableUtils.java:74)

PR #295 should fix the issue