OFBiz
  1. OFBiz
  2. OFBIZ-4977

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

    Details

    • Type: Bug Bug
    • Status: Patch Available
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: SVN trunk
    • Fix Version/s: None
    • Component/s: framework
    • Labels:
      None

      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

          People

          • Assignee:
            Unassigned
            Reporter:
            Sumit Pandit
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development