Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5FBF3DB87 for ; Fri, 17 Aug 2012 13:59:56 +0000 (UTC) Received: (qmail 96382 invoked by uid 500); 17 Aug 2012 13:59:55 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 96290 invoked by uid 500); 17 Aug 2012 13:59:55 -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 96282 invoked by uid 99); 17 Aug 2012 13:59:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Aug 2012 13:59:55 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [74.208.5.67] (HELO mailout-us.gmx.com) (74.208.5.67) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 17 Aug 2012 13:59:49 +0000 Received: (qmail 730 invoked by uid 0); 17 Aug 2012 13:59:25 -0000 Received: from 204.194.77.3 by rms-us010 with HTTP Content-Type: multipart/alternative; boundary="========GMXBoundary113031345211963980661" Date: Fri, 17 Aug 2012 09:59:23 -0400 From: "Alex Leshinsky" Message-ID: <20120817135923.113030@gmx.com> MIME-Version: 1.0 Subject: Re: How to please To: users@jackrabbit.apache.org X-Authenticated: #72317028 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 X-GMX-UID: bCtccENN3zOl2wUbJHAhcQV+IGRvb4Br X-Virus-Checked: Checked by ClamAV on apache.org --========GMXBoundary113031345211963980661 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Felix, thanks for your input. The items actually live in a different tree (credential profiles belonging to individual users). And an item can only belong to one category. So that I need to model a one-to-many scheme (one category many items). Any suggestions in this regard? Thanks, Alex. ----- Original Message ----- From: Felix Oghina Sent: 08/17/12 01:57 AM To: users@jackrabbit.apache.org Subject: Re: How to please Hi Alex, Why not store your items under the categories? For example you could have /.../category1/category2/item. That is pretty much "the JCR way". Alternatively, if for example you need to have items belong in multiple categories, you can use an array property. For example: --categories ----category1 ------@name=category1 ----category2 ------@name=category2 --items ----item1 ------@categories=[category1, category2] I think that would be pleasing enough ;). Cheers, Felix Alex Leshinsky wrote: There’s an eerie feeling in me that this question has been asked and answered a million times. Being in the grip of my decades long RDB programming, I can’t seem to decide what is the “JCR way” to deal with this: I need to associate certain objects, lets call them “items”, with a classification named “category”. Categories have a hierarchical structure and sit in a tree outside items. An item can be associated with any node in the Category tree. I’m awa re that David calls IDs evil. So, how do I model that without risking to burn in hell? Many thanks! Alex Leshinsky Alex Leshinsky --========GMXBoundary113031345211963980661--