IvanLatysh wrote:
You can use a non-mandatory or a multi-valued property if you need to
handle cases where a property can be absent, or present but with no
values.
The problem is that JCR is type strict so Integer property can't have
the null value, so I have to make String property instead and when I
produce XML for UI property has the wrong type. And if property deleted
in JCR I can't produce the valid XML because I don't know that this
property was there at the first place.
Ivan, it seems you didn't really read what Jukka explained.
I'll try it again:
1) using the node type definition of a node you can find out if the node has a
property declared which is not set, thus you can infer that the value is in your
sense 'null'. if of course requires that you create a custom node type and
declare your properties.
2) you can use a multi-valued property where you set the value to an empty
array. again, this allows you to interpret the value as 'null'. see jsr 170
specification 4.7.1
regards
marcel