[
https://issues.apache.org/jira/browse/OFBIZ-4977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sharan Foga updated OFBIZ-4977:
-------------------------------
Sprint: Bug Crush Event - 21/2/2015
> 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: Ashish Vijaywargiya
> 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)