jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From IvanLatysh <i...@yourmail.com>
Subject Re: Removing Items
Date Fri, 20 Jul 2007 15:50:42 GMT
Alexandru Popescu ? wrote:

> Well, I think this is a theoretical discussion, and I may not be
> holding the explanation for it. Imo null can be seen as a predefined
> value (as is True/False, +/-Infinite) and it can be seen as different
> to "non-existant".
> Getting back to a real use case, I will try to present one: lazy
> registration pattern (gradually data gathering): for this scenario a
> non-existant value may mean that the data was never asked for, while a
> NULL may mean that the data was asked for and answered with nothing.
> For supporting this scenario, right now you need to use a app specific
> value to mark the case.
> I will finish by saying that I am not 100% sure this is an issue or a
> feature. People that are seeing it as an issue are most probably
> people coming from a RDBMS background where NULL is a predefined value
> -- but mainly because not-existance cannot be expressed otherwise. On
> the other side, I still think that there are cases where NULL and
> non-existant may mean different things.

I agree with Alexandru, and will add my use-case where we are greatly suffer 
from such behavior.

We use XForms as presentation layer that operates with XML data model.
So when user open a new form and don't fill-up a field, data come back to the 
server as an empty tag, now when I transform this into JCR Property I have no 
chance to set it to null, so I am loosing the property.
And when user want to see the data it missing the field (not just field is 
empty, but form has no field displayed) because JCR removed the property when I 
set it value to null.
As you can see from this use-case and many others - null is a valid value and 
does not mean that property does not exist.

To make use-case more interesting, let's move to medical world with integer 
property. Value from 0 to 10 mean bad and drugs has to be administer or patient 
will die, and null mean this case does not apply and drug must not be administer 
or patient will have good chances not to make to the end of the day.
I am not saying that any med. system will rely just on the number, but it is a 
very important aspect of the system.

Ivan Latysh

View raw message