jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: GetPropertyNamesTest.testGetPropertyNames
Date Wed, 23 Aug 2006 08:16:23 GMT
Hi Julian,

Julian Reschke wrote:
> Hi.
> 
> In this case the following query
> 
>     "/jcr:root"
> 
> is executed. The test case checks the column names in the result match 
> the declared (single-valued) properties on nt:base, plus jcr:path and 
> jcr:score.
> 
> Questions:
> 
> 1) Why nt:base? What if "/" has a type with more properties?

If the element test is absent the type constraint defaults to the one 
that includes all node types: nt:base

If a query does not explicitly specify properties to select (in SQL 
this would be a 'select *') the properties of the node type specified 
by the type constraint are returned. in case of nt:base those 
properties are jcr:primaryType and jcr:mixinTypes.

> 2) It doesn't seem to me that the query specifies a type constraint, so 
> why the check at all?

this is because of the nt:base default described above.

> 3) I thought support for jcr:score was optional???

It is kind of optional. If an implementation is not able to provide a 
jcr:score it can always return a dummy value.

The spec says: "As well, a score column will also be included, though 
it is not required that its contents always be meaningful."

regards
  marcel

Mime
View raw message