ormlite-jdbc icon indicating copy to clipboard operation
ormlite-jdbc copied to clipboard

Fixed exceptions in some JDBC drivers when working with chars

Open Bo98 opened this issue 7 years ago • 1 comments

Not all JDBC drivers support java.lang.Character (for whatever reason). Notably MariaDB, Oracle and SQL Server. I've added a FieldConverter to convert the SQL arg into a String which is accepted by all 3 (+ 1 for JTDS) JDBC drivers. Note that the underlying SQL type remains unchanged so this should have no backwards compatibility concerns.

The new CharacterCompatFieldConverter currently resides in this repository but it should probably be moved into ormlite-core. Perhaps into a new package com.j256.ormlite.field.converters where we can also move BooleanNumberFieldConverter too (currently resides in BaseDatabaseType).

This fixes some exceptions first reported in issue #2.

Bo98 avatar Dec 19 '18 02:12 Bo98

Hey @Bo98 tried to ping you via your email. Any interest in becoming an ormlite maintainer? Not a ton of extra work but I'd love to get another pair of eyes on it. Please ping me at my contact form. https://256stuff.com/gray/email/

j256 avatar Dec 10 '21 15:12 j256