Menu

#349 H2DataTypeFactory does not properly support UUID data type

v2.4.*
closed-accepted
None
2.5.0
5
2014-04-20
2013-12-29
No

In case of H2 database and UUID column types, dbunit treats it as a binary field which makes it near impossible to supply test data in the XML file since it will expect a BASE64 string.
I added the following piece of code and this seems to do the trick

@Override
public DataType createDataType(int sqlType, String sqlTypeName) throws DataTypeException {
    if ("UUID".equals(sqlTypeName)) {
        return DataType.NVARCHAR;
    }

Discussion

  • Jeff Jensen

    Jeff Jensen - 2013-12-29
    • status: open --> pending
    • assigned_to: Jeff Jensen
     
  • Jeff Jensen

    Jeff Jensen - 2013-12-29

    Thank you.

    Can you add a test that proves it fails without this change and passes with this change, please?

     
  • Jeff Jensen

    Jeff Jensen - 2014-04-19
    • status: pending --> closed-accepted
     
  • Jeff Jensen

    Jeff Jensen - 2014-04-19

    I take that as a "no"...

    Rolling the dice and committed. H2 users be ware...

    Applied for next release after 2.4.9.

     
  • Jeff Jensen

    Jeff Jensen - 2014-04-20
    • Fixed Release: --> 2.5.0
     

Log in to post a comment.

MongoDB Logo MongoDB