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

        Sumit Pandit created issue -
        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
        Sumit Pandit made changes -
        Field Original Value New Value
        Attachment OFBIZ-4977.patch [ 12538135 ]
        Sumit Pandit made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Adam Heath made changes -
        Assignee Adam Heath [ doogie ]
        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
        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
        Ashish Vijaywargiya made changes -
        Assignee Adam Heath [ doogie ] Ashish Vijaywargiya [ toashishvijay ]
        Sharan Foga made changes -
        Sprint Bug Crush Event - 21/2/2015 [ 91 ]
        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
        Jacques Le Roux made changes -
        Status Patch Available [ 10002 ] Closed [ 6 ]
        Fix Version/s 14.12.01 [ 12327361 ]
        Fix Version/s 12.04.06 [ 12328243 ]
        Fix Version/s 13.07.02 [ 12328788 ]
        Fix Version/s Upcoming Branch [ 12329183 ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        58m 34s 1 Sumit Pandit 27/Jul/12 08:09
        Patch Available Patch Available Closed Closed
        939d 1h 15m 1 Jacques Le Roux 21/Feb/15 08:25

          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