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: Querying the jcr:primaryType property [2]
Date Wed, 13 Apr 2005 08:33:05 GMT
hmm, interesting thought... and I think you're right. I guess that needs 
some clarification in the spec. it currently states that element node 
test and jcr:primaryType restrict nodes to the common type.

shouldn't the SQL equivalent be:

SELECT * FROM nt:base WHERE jcr:primaryType='X'



Peeter Piegaze wrote:
> Well, actually this is how it was implemented and at the time 
> we thought it made sense (or maybe we didn't think about it 
> too much ;-). 
> Now that I look at it again it does strike me as incorrect.
> IMO the correct behavior should be:
> //*[jcr:primaryType='X'] return all nodes with *declared* type of X.
> //element(*,'X') returns all nodes of type X (declared and inherited)
> The equivalents in SQL would be (respectively):
> SELECT * FROM jcr:primaryType WHERE jcr:primaryType='X'
> and
> SELECT * FROM jcr:primaryType

View raw message