Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-4977

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • 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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            toashishvijay Ashish Vijaywargiya
            sumitp Sumit Pandit
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Agile

                Completed Sprint:
                Bug Crush Event - 21/2/2015 ended 26/Feb/15
                View on Board

                Slack

                  Issue deployment