jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Douglass" <douglass.d...@gmail.com>
Subject Re: SQL equivalent of Node.hasProperty?
Date Thu, 24 Aug 2006 12:49:42 GMT
Thanks for the reply (and others) Marcel,

I thought #1 should have worked also. I'll write up a test to inspect the
Row and it's values and see what's actually in there.

Note that the nodes in question are an exported document view that is
imported during Junit TestCase.setUp and removed again in
TestCase.tearDown-- sort of a poor mans dbunit for jcr.

Doug

On 8/24/06, Marcel Reutegger <marcel.reutegger@gmx.net> wrote:
>
> 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.
>
> regards
>   marcel
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message