Current behavior:
Variable type 'spin-serialization' writes a serialized value as byte array, if the length of the value exceeds 4000 bytes. Else, it writes it to the column TEXT_.
Problem:
This check may be too lax to not work on all the databases we support. For example, on oracle we create the field TEXT_ as NVARCHAR2(2000) which means that the field can take up to 2000 characters (and up to 4000 byte which is the length restricition for NVARCHAR2 fields, cf. [1]). In case the input consists of 4000 single-byte UTF-8 characters, the check done in the variable type would fail to prevent a database error.
Todo:
Check the semantics of the TEXT_ field declarations for all supported databases and make the field length check in the spin-serialization type dependent on the database in use (should be done in DbSqlSessionFactory).
Notes:
- See the comments for a detailed evaluation on what should be considered when dealing with the respective databases