Marcel Reutegger 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.
You are right! Jukka, I am sorry.

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

It is true if I know data structure, but we are working on the system that manage unstructured data. I have no knowledge of what kind of data will be stored in the repository. This make very important for us to preserve any property even it has null value. Otherwise we are loosing the data.

--
Ivan Latysh
[EMAIL PROTECTED]

Reply via email to