jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek" <aklim...@day.com>
Subject Re: Reply: Does mixin effect search result?
Date Mon, 16 Jun 2008 09:42:22 GMT
On Mon, Jun 16, 2008 at 11:26 AM, Yonder <zyzha@yahoo.com.cn> wrote:
> Thany you very much! i have modified the query statememt to:
>
>   //*[@jcr:primaryType = 'ocm:file2']

Well, this is not good, since it works around the bug that you use
ocm:file2 as a primary node type, not as a mixin, because of the
addNode(..., "ocm:file2") statement noted in previous mails. You
should do an addNode(..., "nt:unstructured"), call
node.addMixin("ocm:file2") and use the query as before, since
Jackrabbit supports mixins in element() as well (didn't know that
before Marcel corrected me).

> and it works ok. but i have another question, does jackrabbit not support type constraint
on mixin node types (6.6.3.2 Type Constraint)? Jackrabbit ocm's query implementation always
use element() for type constraint whether the node type is mixin or not :

See above, it works in Jackrabbit with both primary node types and mixins.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message