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

Olivier Heintz commented on OFBIZ-4949:
---------------------------------------

Paul, setOtherFieldsToNull est clearly better, thank's to propose it. I'll 
correct the patch

Scott,
The goal is to avoid to give all field, to have xml data file with only field 
with value.
ex: in  PortalPortlet, if portletTypeId is populated, screeLocation is not 
mandatory, because a default value exist ( 
${component}:widget/${subcomponent}Screens.xml ) so if a enhancement move the 
screen to the default place, screenLocation should be change to null. It's the 
same thing for screenName, menuName, menuLocation, scriptName, formName, 
formLocation, ..... If the setOtherFieldsToNull not exist, it would be 
necessary to give all field with a default value to be sure.
Clearly, PortalPortlet is the only use case where this new attribute will be 
very usefull. 
                
> add a new attribute for for entity-engine-xml tag, put-other-field-to-null= 
> true, if it exist at the beginning data file, all update will put to null all 
> field not detail in this file
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-4949
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4949
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Olivier Heintz
>            Priority: Minor
>         Attachments: OFBIZ-4949.patch
>
>
> This enhancement is useful when a entity is load by reader (ex: seed) and 
> sometime, it could be modify in data file. If a field is change from a value 
> to null, currently this modification will not be done in the next load.
> For portletWidget, entity PortalPortal have a lot of field with potential 
> default value, so sometime, first release use some field and when it's 
> reviewed and corrected, some field are changed to null to use the default 
> value (to follow best practice).
> This enhancement will be very useful for portletData file. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to