Tag: testing

  • Switching Hibernate’s UUID Type Mapping per Database

    JDBC doesn’t include UUIDs as one of its generic SQL types and so the different relational databases supported by Hibernate have different mechanisms to save and retrieve UUIDs. PostgreSQL’s JDBC driver, for example, requires that you use Types.OTHER as a surrogate for the missing UUID constant: preparedStatement.setObject( index, uuid, Types.OTHER ); Whereas H2 requires the…