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: [email protected] 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 <[email protected]> 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
