From fda07ca7bbd875d246a410a199e9c770231e82b6 Mon Sep 17 00:00:00 2001 From: Piotr Kotlicki Date: Thu, 8 Nov 2018 18:38:09 +0100 Subject: [PATCH] Setting Object value in Prepared statement as default --- src/main/java/com/jcabi/jdbc/PrepareArgs.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/jcabi/jdbc/PrepareArgs.java b/src/main/java/com/jcabi/jdbc/PrepareArgs.java index 99138cd..1660762 100644 --- a/src/main/java/com/jcabi/jdbc/PrepareArgs.java +++ b/src/main/java/com/jcabi/jdbc/PrepareArgs.java @@ -85,7 +85,7 @@ public void prepare(final PreparedStatement stmt) throws SQLException { } else if (arg instanceof byte[]) { stmt.setBytes(pos, byte[].class.cast(arg)); } else { - stmt.setString(pos, arg.toString()); + stmt.setObject(pos, arg); } ++pos; }