Author: adrianc
Date: Sat Jan 14 20:57:25 2012
New Revision: 1231584
URL:
http://svn.apache.org/viewvc?rev=1231584&view=revLog:
Fixed a bug in GenericEntity.java where warnings were logged when the value came from a view entity and it tried to generate a property key for localization.
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=1231584&r1=1231583&r2=1231584&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Sat Jan 14 20:57:25 2012
@@ -840,8 +840,10 @@ public class GenericEntity extends Obser
}
// read value with modelEntity name of pkNames
for (String pkName : pkNamesToUse) {
- keyBuffer.append('.');
- keyBuffer.append(this.get(pkName));
+ if (this.containsKey(pkName)) {
+ keyBuffer.append('.');
+ keyBuffer.append(this.get(pkName));
+ }
}
} else {
Iterator<ModelField> iter = modelEntity.getPksIterator();