[ https://issues.apache.org/jira/browse/OFBIZ-4949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500140#comment-13500140 ]
Scott Gray commented on OFBIZ-4949: ----------------------------------- UEL could be a good idea but it's a separate feature IMO, we already have the ability to set a field null by supplying an empty attribute value as I mentioned above. Maybe the issue here is larger than we think and the forest isn't being seen for the trees. The current mode of operation for data files is to perform a create-or-update operation for each record present. What is essentially being asked for here is a new operation mode of create-or-replace. How about if we were to find a way to support any possible operation mode? This could also solve the recurring problems that seem to appear with seed-initial data where we would want a create only operation with no update if the value exists. Possible operations: - create - create-update - create-replace - delete? If we were to go this route we'd just need to decide how the operation should be set for a given file or record, options coming to mind: 1. At the reader in the entity-engine.xml or ofbiz-component.xml files 2. As an attribute of the entity-engine-xml element 3. As child element of the entity-engine-xml element 4. As an attribute of the record element itself I think I'd prefer #2 or #3, probably #3 Thoughts? > Add a new attribute for entity-engine-xml tag, set-other-fields-to-null= > true, if it exists at the beginning data file, all updates will set to null > all fields not detailed in the 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-NMA.patch, OFBIZ-4949.patch, > OFBIZ-4949.patch, 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 For more information on JIRA, see: http://www.atlassian.com/software/jira