jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: DM Rule #4: Beware of Same Name Siblings.
Date Tue, 10 Jul 2007 08:06:45 GMT
Hi,

On 7/10/07, sbarriba <sbarriba@yahoo.co.uk> wrote:
> So can we conclude this thread with a JCR pattern/best practise for
> modelling the following?
>
>  * ordered composition examples e.g. an ordered list
>
>  * unordered composition example e.g. a bag

I think ordering is orthogonal to naming.

You can set the ordered bit on a node type to determine whether the
list of child nodes is ordered or not, but personally I don't think it
makes that much difference and tend to default to using ordered nodes
that cover both cases.

The bag data structure (name-value map that can have multiple distinct
values per name) is a typical candidate for using same name siblings,
but an equally valid alternative would be to use a collection subnode
with some second level of naming for things that fall under the same
name in the bag structure.

BR,

Jukka Zitting

Mime
View raw message