Added a test for using an Enum as a record key, observed brokitude, fixed

brokitude, but did not take the opportunity to do so in a non-hacky way.
This commit is contained in:
Michael Bayne
2010-12-01 19:53:03 +00:00
parent 5f937fae61
commit 52f432270d
4 changed files with 111 additions and 1 deletions
@@ -964,6 +964,9 @@ public abstract class BuildVisitor implements FragmentVisitor<Void>
if (value instanceof ByteEnum) {
// byte enums require special conversion
stmt.setByte(argIx, ((ByteEnum)value).toByte());
} else if (value instanceof Enum) {
// enums are converted to strings
stmt.setString(argIx, ((Enum)value).name());
} else if (value instanceof int[]) {
// int arrays require conversion to byte arrays
int[] data = (int[])value;