[ https://issues.apache.org/jira/browse/OFBIZ-4977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14330020#comment-14330020 ]
Arun Patidar commented on OFBIZ-4977: ------------------------------------- Attached patch is working fine. I have regenerated the issue and verified it. This patch is also applicable on 13.07, 14.12 and trunk > Limitation and issue with delegator.findByPrimaryKeyPartial method : returns > error when partialKeyset contains PK value. > ------------------------------------------------------------------------------------------------------------------------- > > Key: OFBIZ-4977 > URL: https://issues.apache.org/jira/browse/OFBIZ-4977 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Trunk > Reporter: Sumit Pandit > Assignee: Adam Heath > Attachments: OFBIZ-4977.patch > > > * *Issue with method:* > delegator.findByPrimaryKeyPartial(GenericPK primaryKey, Set<String> keys) > * *Problem Statement:* > Above method return error when fieldsToSelect(keys) set contains any of > primary key. > * *Expected Result:* > Method should return GenericValue object containing all valid fields which > has been passed in fieldToSelect keyset. > * *Example:* > GenericPK genericPk = delegator.makePK("Product", UtilMisc.toMap("productId", > "GZ-2644")); > GenericValue product = delegator.findByPrimaryKeyPartial(genericPk, > UtilMisc.toSet("productId", "productTypeId", "internalName", > "longDescription")); > * *Response :* > org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen > [component://ecommerce/widget/CommonScreens.xml#xxxx]: > org.ofbiz.base.util.GeneralException: Error running Groovy script at location > [component://ecommerce/webapp/ecommerce/WEB-INF/actions/xxxx.groovy] (In > partialSelect invalid field names specified: [productId]) (Error running > Groovy script at location > [component://ecommerce/webapp/ecommerce/WEB-INF/actions/xxxx.groovy] (In > partialSelect invalid field names specified: [productId])) > * *Where productId is completely valid field name.* -- This message was sent by Atlassian JIRA (v6.3.4#6332)