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

Jacques Le Roux commented on OFBIZ-293:
---------------------------------------

I carefully reviewed propositions/comments by Adrian, Nicolas and Paul above 
(with corresponding code review) and I must say I agree with Martin. His 
proposition is simple, neat and fits in the current implementation of handling 
null fields while importing (see r1425813). So I will commit it soon, except if 
someone really identifies an issue or propose a better (and still simple ;)) 
solution.

I though still regret that we have this dichotomy with null and null-field 
(nullField) between Entities and Minilang. It makes things confusing and it 
would be best if we would have used only one. I guess null, but in my 
OFBIZ-1602 comment above I wrote that nullField was introduced because of a 
Freemarker issue with null (I did not research again, I guess I was right 
then). 
At least in Minilang having only one form would definitively clarify this 
aspect. I remember having tried to use "null" instead of "nullField" in a 
condition-expr and not succeeded when nullField worked. I though can OOTB find 
condition-exprS using "null" which now makes me doubt :/. And also why not 
using nullField in if-compare. Also we have this difference in screen/form 
action? OK, too much for tonight but I feel we are almost there...

> data import - nulling fields impossible
> ---------------------------------------
>
>                 Key: OFBIZ-293
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-293
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Marco Risaliti
>            Priority: Minor
>         Attachments: OFBIZ-293_set-empty-strings-as-null.patch, 
> ofbiz-293-patch.txt, ofbiz-462-patch.txt
>
>
> It's a copy of the old-jira issue 
> http://jira.undersunconsulting.com/browse/OFBIZ-462 Tarlika Elisabeth Schmitz
> =================================================
> I am on rev 5274. 
> data import from .xml file: empty attributes (e.g. description="") are 
> ignored and the field retains its former value. 
> Comment by Chris Juettner [04/Oct/05 01:51 PM]
> This patch comments out the check for null or empty values in the data XML 
> file found by the EntitySaxReader. I also added an additional warning message 
> in case you do not want to persist empty values to the database but still 
> would like to know what happened. 
> Comment by Si Chen [04/Oct/05 01:59 PM]
> Chris- 
> Just a comment: it's very important that a field in the entity engine is set 
> to null ONLY when the XML file specifically has an empty attribute (ie, 
> description=""). Otherwise, there's a lot of seed data that is in separate 
> XML files, and they could overwrite each other. 
> Comment by Chris Juettner [10/Oct/05 11:56 AM] [ Permlink ] 
> Si, 
> I'm not sure I understand your comment about seed data in seperate XML files 
> overwriting each other. Shouldn't seed data XML files be entity specific? Why 
> would one seed data XML file overwrite another? 
> Do you have any comment on what a better solution is for seed data values 
> that could be empty? 
> Thanks 
> Chris 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to