[jira] [Closed] (OFBIZ-4977) Limitation and issue with delegator.findByPrimaryKeyPartial method : returns error when partialKeyset contains PK value.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Closed] (OFBIZ-4977) Limitation and issue with delegator.findByPrimaryKeyPartial method : returns error when partialKeyset contains PK value.

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-4977.
----------------------------------
       Resolution: Fixed
    Fix Version/s: Upcoming Branch
                   13.07.02
                   12.04.06
                   14.12.01

Thanks Ashish, Arun, Sumit,

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


> 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: Trunk
>            Reporter: Sumit Pandit
>            Assignee: Ashish Vijaywargiya
>             Fix For: 14.12.01, 12.04.06, 13.07.02, Upcoming Branch
>
>         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 was sent by Atlassian JIRA
(v6.3.4#6332)