jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: SQL equivalent of Node.hasProperty?
Date Thu, 24 Aug 2006 09:08:05 GMT
Doug Douglass wrote:
> I thought I knew the answer but I'm unable to get it right:
>  If a node type baz is defined as having an optional property foo:bar
> (STRING), and I want to find all such nodes without a foo:bar property
> actually stored (i.e., Node.hasProperty("foo:bar") == false), I would 
> expect
> that one of the following would work:
>  1. SELECT * FROM baz WHERE foo:bar IS NULL;

this one should work. there is a test case, which actually tests this 
feature: SimpleQueryTest.testIsNull()

are you able to reproduce the error when using a predefined node type 
like nt:unstructured?

>  2. SELECT * FROM baz WHERE foo:bar = '';

this will return baz nodes with a foo:bar property *set* to an empty 
string. which is obviously not the same as nodes not having the 
property at all.


View raw message