You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Maxim <ma...@anahoret.com> on 2005/05/30 16:53:26 UTC

JCR query question

Hello jackrabbit-dev.

When query is made and result is returned, should nodes in
result list be "real" nodes and contain all properties or they will be
a "pseudo-nodes" containing only properties mentioned in query.

Or maybe this behavior depends in query type (SQL or XPath)?

Please advise.

Thank you.

-- 
Best regards, Maxim.
Anahoret Team.


Re: JCR query question

Posted by Jukka Zitting <ju...@zitting.name>.
Hi,

Maxim wrote:
> When query is made and result is returned, should nodes in
> result list be "real" nodes and contain all properties or they will be
> a "pseudo-nodes" containing only properties mentioned in query.
> 
> Or maybe this behavior depends in query type (SQL or XPath)?

I think this depends on whether you use QueryResult.getRows() or 
QueryResult.getNodes() to retrieve the query results.

AFAIK (see the JSR 170 spec for the correct interpretation) 
QueryResult.getRows() only returns the properties mentioned in the query 
while QueryResult.getNodes() returns live Node instances just as (for 
example) Node.getNodes() does.

BR,

Jukka Zitting