hibernate-orm
hibernate-orm copied to clipboard
change getNationalizationSupport() on Sybase to use UNSUPPORTED
getNationalizationSupport() currently returns IMPLICIT for the jTDS driver. But from the comment I think it should probably return UNSUPPORTED.
WDYT @sebersole @beikov ?
The comment meant to say that the jTDS driver doesn't support the getNString/setNString methods, but getString/setString seem to work fine since the database does support the NCHAR/NVARCHAR types. I thought that was exactly the use case for IMPLICIT, no?
Well if you turn on hibernate.use_nationalized_character_data Hibernate uses setNString() / getNString(), so I think that counts as "not supported", right?
I mean, I guess we could put a catch in NVarcharJdbcType, but it's not there today.
I thought that was exactly the use case for
IMPLICIT, no?
Not exactly, no. With IMPLICIT it will use VARCHAR and CHAR for DDL generation, which on SQL Server don't (by default) accommodate Unicode.
Hmm, then it might be better to register special JdbcTypes for NChar, NVarchar and NClob when we detect the jTDS driver.
Well I'm not sure that's quite right either: at least it's quite inconsistent.
I think what you're reaching for is a new enumeration value IMPLICIT_FOR_JDBC_EXPLICIT_FOR_SQL.