|
Sumit Pandit created OFBIZ-4977:
----------------------------------- Summary: 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: SVN trunk Reporter: Sumit Pandit * *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 is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
[ https://issues.apache.org/jira/browse/OFBIZ-4977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sumit Pandit updated OFBIZ-4977: -------------------------------- Attachment: OFBIZ-4977.patch Please find the patch in attachment for the issue. -- Thanks And Regards Sumit Pandit > 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: SVN trunk > Reporter: Sumit Pandit > 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 is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
| Free forum by Nabble | Edit this page |
