You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2012/06/29 14:54:43 UTC
svn commit: r1355347 -
/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java
Author: adrianc
Date: Fri Jun 29 12:54:42 2012
New Revision: 1355347
URL: http://svn.apache.org/viewvc?rev=1355347&view=rev
Log:
Minor change to Mini-language <find-by-primary-key> element - prevent unnecessary copying of field name set.
Modified:
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java?rev=1355347&r1=1355346&r2=1355347&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java Fri Jun 29 12:54:42 2012
@@ -41,6 +41,8 @@ import org.w3c.dom.Element;
/**
* Implements the <find-by-primary-key> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cfindbyprimarykey%3E}}">Mini-language Reference</a>
*/
public final class FindByPrimaryKey extends MethodOperation {
@@ -92,7 +94,7 @@ public final class FindByPrimaryKey exte
Collection<String> fieldsToSelectList = fieldsToSelectListFma.get(methodContext.getEnvMap());
try {
if (fieldsToSelectList != null) {
- valueFma.put(methodContext.getEnvMap(), delegator.findByPrimaryKeyPartial(delegator.makePK(entityName, inMap), UtilMisc.makeSetWritable(fieldsToSelectList)));
+ valueFma.put(methodContext.getEnvMap(), delegator.findByPrimaryKeyPartial(delegator.makePK(entityName, inMap), UtilMisc.toSet(fieldsToSelectList)));
} else {
valueFma.put(methodContext.getEnvMap(), delegator.findOne(entityName, inMap, useCache));
}