OFBiz
  1. OFBiz
  2. OFBIZ-4977

Limitation and issue with delegator.findByPrimaryKeyPartial method : returns error when partialKeyset contains PK value.

    Details

    • Sprint:
      Bug Crush Event - 21/2/2015

      Description

      • 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.
      1. OFBIZ-4977.patch
        0.9 kB
        Sumit Pandit

        Activity

        Hide
        Jacques Le Roux added a comment -

        Thanks Ashish, Arun, Sumit,

        Sumit your patch is in
        trunk r1661292
        R14.12 r1661293
        R13.07 r1661294
        R12.04 r1661295

        Show
        Jacques Le Roux added a comment - Thanks Ashish, Arun, Sumit, Sumit your patch is in trunk r1661292 R14.12 r1661293 R13.07 r1661294 R12.04 r1661295
        Hide
        Arun Patidar added a comment -

        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

        Show
        Arun Patidar added a comment - 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
        Hide
        Sumit Pandit added a comment -

        Thanks Adam for looking into it. Please let me know for any issue with the jira.

        Show
        Sumit Pandit added a comment - Thanks Adam for looking into it. Please let me know for any issue with the jira.
        Hide
        Sumit Pandit added a comment -

        Please find the patch in attachment for the issue.


        Thanks And Regards
        Sumit Pandit

        Show
        Sumit Pandit added a comment - Please find the patch in attachment for the issue. – Thanks And Regards Sumit Pandit

          People

          • Assignee:
            Ashish Vijaywargiya
            Reporter:
            Sumit Pandit
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development

                Agile