You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Anne Jessel (JIRA)" <ji...@apache.org> on 2011/09/26 03:27:26 UTC

[jira] [Commented] (OFBIZ-3847) Entity ECAs not triggered correctly when using Delegator.storeAll() method

    [ https://issues.apache.org/jira/browse/OFBIZ-3847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114427#comment-13114427 ] 

Anne Jessel commented on OFBIZ-3847:
------------------------------------

This bug is one I'd like to fix. Scott's suggestion looks good to me. Anyone have any comments or better ideas before I go ahead and implement it?

> Entity ECAs not triggered correctly when using Delegator.storeAll() method
> --------------------------------------------------------------------------
>
>                 Key: OFBIZ-3847
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3847
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 10.04
>            Reporter: Martin Kreidenweis
>         Attachments: GenericDelegator.java.diff
>
>
> The conditions don't work when updating (not creating) entities using the Delegator.storeAll() method. E.g. the following condition does not work:
> {code}
> <eca entity="Product" operation="create-store" event="return">
>         <condition field-name="autoCreateKeywords" operator="not-equals" value="N"/>
>         <action service="indexProductKeywords" mode="sync" value-attr="productInstance"/>
> </eca>
> {code}
> The indexProductKeywords service is called anyway when the product is updated and the autoCreateKeywords was "N" and stays "N". It works correctly for newly created products. 
> The problem is in the method GenericDelegator.storeAll(), where unchanged field values are not passed down to the store() method. The store method calls the ECA engine, which does not receive the unchanged values at all and thus cannot evaluate the EECA conditions correctly. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira