Author: adrianc
Date: Mon Jan 5 19:06:41 2015
New Revision: 1649614
URL:
http://svn.apache.org/r1649614Log:
Fixed a bug in the entity engine that prevented data loading into a byte-array field type.
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=1649614&r1=1649613&r2=1649614&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Mon Jan 5 19:06:41 2015
@@ -472,6 +472,8 @@ public class GenericEntity implements Ma
try {
value = ObjectType.simpleTypeConvert(value, type.getJavaType(), null, null);
} catch (GeneralException e) {}
+ } else if ((value instanceof String) && "byte[]".equals(type.getJavaType())) {
+ value = ((String) value).getBytes();
}
if (!ObjectType.instanceOf(value, type.getJavaType())) {
if (!("java.sql.Blob".equals(type.getJavaType()) && (value instanceof byte[] || ObjectType.instanceOf(value, ByteBuffer.class)))) {