-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Attributes of the type java.lang.Character have the data type SAMLLINT in a MySQL Database
e.g. 'grouptSeperator' on Language:
<attribute generate="true" autocreate="true" qualifier="groupingSeparator" type="java.lang.Character">
<persistence type="property" qualifier=""/>
<modifiers read="true" write="true" search="true" encrypted="false" optional="true" removable="true" initial="false"
unique="false" private="false" partof="false"/>
</attribute>When executing a schema migration to an MS SQL-Server database, the samllint data type gets assigned to INTEGER which will cause errors after the database-sync when editing the 'groupSeperator` field.
The function writeValue(PreparedStatement stmt, int fieldIndex, Character value) in de.hybris.platform.persistence.property.JDBCValueMappings is explicitly checking if the used database is SQLServer and if this is the case it uses PreparedeStatement.setString(...) to set the Character value, which will cause an error since the type of the database column is INTEGER.
The type of java.lang.Character Columns should be CHAR(4) (This is the case when initizalizing an SQL-Server database)