From f0c8d185f0b553cd565bff99fc5b9718c29d3166 Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Wed, 27 Jan 2010 15:21:57 +0000 Subject: [PATCH] With last night's patch to MultiKeySet, we'll be using a lot more IN() statements, and some of them contain shorts and bytes. Handle it. --- src/java/com/samskivert/depot/impl/PostgreSQL4Builder.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/java/com/samskivert/depot/impl/PostgreSQL4Builder.java b/src/java/com/samskivert/depot/impl/PostgreSQL4Builder.java index 2069a7f..214284c 100644 --- a/src/java/com/samskivert/depot/impl/PostgreSQL4Builder.java +++ b/src/java/com/samskivert/depot/impl/PostgreSQL4Builder.java @@ -64,6 +64,8 @@ public class PostgreSQL4Builder extends PostgreSQLBuilder type = "bigint"; } else if (testValue instanceof String) { type = "varchar"; + } else if (testValue instanceof Short || testValue instanceof Byte) { + type = "smallint"; } else if (testValue instanceof ByteEnum) { Byte[] bytes = new Byte[values.length]; for (int ii = 0; ii < bytes.length; ii ++) {