mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
#2774 - Postgres ANY / MultiValueSupport with byte[]/binary data
Tidy up MultiValueBind.toArray() only
This commit is contained in:
1 parent
fed4413259
commit
8966faeb7e
1 file changed
+1
-9
+1
-9
@@ -17,15 +17,7 @@ public class MultiValueBind {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Object[] toArray(Collection<?> values, ScalarType<?> type) {
|
Object[] toArray(Collection<?> values, ScalarType<?> type) {
|
||||||
if (type.binary()) {
|
Object[] array = type.binary() ? new byte[values.size()][] : new Object[values.size()];
|
||||||
byte[][] array = new byte[values.size()][];
|
|
||||||
int i = 0;
|
|
||||||
for (Object value : values) {
|
|
||||||
array[i++] = (byte[])type.toJdbcType(value);
|
|
||||||
}
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
Object[] array = new Object[values.size()];
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (Object value : values) {
|
for (Object value : values) {
|
||||||
array[i++] = type.toJdbcType(value);
|
array[i++] = type.toJdbcType(value);
|
||||||
|
|||||||
Reference in new issue
Block a user