Julian Reschke wrote:
I strongly disagree. Being absent, and having an empty string value are
completely different things. Font instance, you can't have a "null"
attribute value in XML.
XML attribute isn't type strict as JCR is.
So parameter.setValue(valueFactory.createValue((Double)null)) should result a
parameter of type 'Double' with null value.
Deleting the property or node and setting the value is a two
different use-cases.
That's true, but the JCR behavior seems harmless to me. The only
alternative that would make sense would be to reject (by throwing an
exception) those requests,
No, it is not the only alternative, but to handle it properly is a better way.
Also JCR API is not consistent in this matter, when consistency is
most important part of any spec.
Here is inconsistence that I refer to:
1) to delete the Node we call: myNode.remove();
2) to delete the Property we call: p.setValue((Value)null);
In the second case I expect to see: p.remove();
You can do that as well, can't you?
Yes I can do that. And as I sad: API is not consistent.
Spec promote usage of "p.setValue((Value)null)" as the way to remove the
property when it should say to use "p.remove();" instead.
=== Proposal ===========================================
* Setting property to NULL will set property value to NULL without
any side effects, such as removing a property.
That would be a major change in the data model. No way.
I believe it is a community process so committee will discuss it.
And again it is funny to hear that it is a major change when XPath just has been
dropped.
Be reasonable, if you brake the spec, at least fix the obvious bugs.
Anyway 2.0 won't be compatible with 1.0
--
Ivan Latysh
[EMAIL PROTECTED]