mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-07 11:48:18 +00:00
HHH-18869 Override Dialect.equivalentTypes in MariaDBDialect to return true for JSON vs LONGTEXT
See https://mariadb.com/kb/en/json-data-type/
This commit is contained in:
parent
de8a565293
commit
c21568f77c
@ -6,6 +6,7 @@
|
||||
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Types;
|
||||
|
||||
import org.hibernate.boot.model.FunctionContributions;
|
||||
import org.hibernate.boot.model.TypeContributions;
|
||||
@ -313,4 +314,11 @@ public IdentifierHelper buildIdentifierHelper(IdentifierHelperBuilder builder, D
|
||||
public String getDual() {
|
||||
return "dual";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equivalentTypes(int typeCode1, int typeCode2) {
|
||||
return typeCode1 == Types.LONGVARCHAR && typeCode2 == SqlTypes.JSON
|
||||
|| typeCode1 == SqlTypes.JSON && typeCode2 == Types.LONGVARCHAR
|
||||
|| super.equivalentTypes( typeCode1, typeCode2 );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user