Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 18541 invoked from network); 16 Mar 2009 16:21:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Mar 2009 16:21:52 -0000 Received: (qmail 58675 invoked by uid 500); 16 Mar 2009 16:21:50 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 58659 invoked by uid 500); 16 Mar 2009 16:21:50 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 58648 invoked by uid 99); 16 Mar 2009 16:21:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 09:21:50 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [128.200.80.34] (HELO smtp1.es.uci.edu) (128.200.80.34) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 16:21:41 +0000 Received: from [169.234.98.208] (av098208.reshsg.uci.edu [169.234.98.208]) (authenticated bits=0) by smtp1.es.uci.edu (8.13.1/8.13.1) with ESMTP id n2GGLGNT002556 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT) for ; Mon, 16 Mar 2009 09:21:18 -0700 X-UCInetID: dpurpura User-Agent: Microsoft-Entourage/12.15.0.081119 Date: Mon, 16 Mar 2009 09:21:16 -0700 Subject: Re: Jackrabbit OCM Querying From: David Purpura To: Message-ID: Thread-Topic: Jackrabbit OCM Querying Thread-Index: AcmmUzsNjYABeHTt2ken1Im+HaHQaQ== In-Reply-To: <3b728ee90903160401v16d830a9x3bd34745fb67fb01@mail.gmail.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 3/16/09 4:01 AM, "Christophe Lombart" wrote: > Can you give more information on your mapped class (DocumentImpl) ? > Which ocm version are you using ? I am using the Jackrabbit OCM 1.6 snapshot, downloaded around 6 February 2009. For a simple query, I would like to be able to return the DocumentImpl with a specified person's name (personName). However, if possible, eventually I would like to move the "personName" attribute into the properties Map and query for the document based on properties in the Map, but I am unsure of how to do this through the OCM QueryManager right now. @Node(discriminator=false) public class DocumentImpl implements IDocument, Serializable{ @Field(path=true) private String path; @Field() private String personName; @Collection private Map properties; //http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-ocm/src/test/j ava/org/apache/jackrabbit/ocm/testmodel/File.java @Bean private File contents; public DocumentImpl(){ this.properties = new HashMap(); } // getters and setters follow } @Node(discriminator=false) public class Property { @Field private String key; @Field private String value; public Property(){ this("", ""); } public Property(String key, String value) { super(); this.key = key; this.value = value; } //getters and setters follow } --David