Hello Ard,

On Jan 9, 2008 1:14 PM, Ard Schrijvers <[EMAIL PROTECTED]> wrote:
> Hello,
>
> > /jcr:root//element(*, MyNodeType)[not(@propertyA)]
> >
>
> So for 1.3.3 IIUC, when you queried for : give me all nodes where
> property X does not exist, it would return documents which have the
> property X, but where it is empty? IMO, it is not logical, then again,
> unfortunate that the behavior would have changed. We did change the way
> this query is executed (see JCR-1064).
>
That's correct (these are multivalued properties, btw).

> I see where the problem arises from, but I think it did not work
> correctly before (though others might be better in judging this. I
> think, it did not work correctly in 1.3.3, and you made use of something
> which is not logical (returning nodes which have the property, where you
> say that they shouldn't have it))
>
> Which part of the jsr-170 spec are you referring to by the way?
>

I'm referring to Section 6.6.3.3. There is a table on p108 (I'm going
from v1.0.1, March 2006) with the following SQL / XPATH
correspondence:

  my:title IS NULL  <-> not(@my:title)

My interpretation of this was that it is equivalent to a query on a
SQL table that has a column "title" where the value of the column is
null. In JCR terms, I assumed that this equates to a node type with
the property defined, but with no value for that property.

If this interpretation of the spec is not accurate, how do I get the
previous behaviour in v1.4? My initial thought is to set the property
value to null and then test for that, but I'd like to be sure I'm
doing things properly to protect myself against future changes in
behaviour :-)

Thanks,

Dean.

Reply via email to