Skip to content

Commit

Permalink
[hibernate#1550] Update expected column types for Db2
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideD committed Apr 4, 2023
1 parent 4a7d2a3 commit c8f8212
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
import java.util.TimeZone;
import java.util.UUID;

import org.hibernate.type.NumericBooleanConverter;
import org.hibernate.type.TrueFalseConverter;
import org.hibernate.type.YesNoConverter;

import org.testcontainers.containers.Db2Container;

import static org.hibernate.reactive.containers.DockerImage.imageName;
Expand All @@ -36,19 +40,18 @@ class DB2Database implements TestableDatabase {
expectedDBTypeForClass.put( boolean.class, "SMALLINT" );
expectedDBTypeForClass.put( Boolean.class, "SMALLINT" );

// FIXME: [ORM-6] Check if we need alternatives
// expectedDBTypeForClass.put( NumericBooleanType.class, "INTEGER" );
// expectedDBTypeForClass.put( TrueFalseType.class, "CHARACTER" );
// expectedDBTypeForClass.put( YesNoType.class, "CHARACTER" );
// expectedDBTypeForClass.put( PrimitiveByteArrayTypeDescriptor.class, "VARCHAR" );
expectedDBTypeForClass.put( NumericBooleanConverter.class, "INTEGER" );
expectedDBTypeForClass.put( YesNoConverter.class, "CHARACTER" );
expectedDBTypeForClass.put( TrueFalseConverter.class, "CHARACTER" );
expectedDBTypeForClass.put( byte[].class, "VARCHAR" );
// expectedDBTypeForClass.put( TextType.class, "VARCHAR" );

expectedDBTypeForClass.put( int.class, "INTEGER" );
expectedDBTypeForClass.put( Integer.class, "INTEGER" );
expectedDBTypeForClass.put( long.class, "BIGINT" );
expectedDBTypeForClass.put( Long.class, "BIGINT" );
expectedDBTypeForClass.put( float.class, "DOUBLE" );
expectedDBTypeForClass.put( Float.class, "DOUBLE" );
expectedDBTypeForClass.put( float.class, "REAL" );
expectedDBTypeForClass.put( Float.class, "REAL" );
expectedDBTypeForClass.put( double.class, "DOUBLE" );
expectedDBTypeForClass.put( Double.class, "DOUBLE" );
expectedDBTypeForClass.put( byte.class, "SMALLINT" );
Expand Down

0 comments on commit c8f8212

Please sign in to comment.