Jukka Zitting wrote:

On 11/5/07, Dan Diephouse <dan.diephouse@mulesource.com> wrote:
Jukka Zitting wrote:
There's nothing like a UNIQUE constraint in JCR or Jackrabbit (though
it might be good to have at least a Jackrabbit feature request in Jira
for that), so the closest you can get probably to make the "resource
name" be the name of the entry node and have all the entries stored as
children of a parent node that doesn't allow same-name-siblings.
 OK that could work!

There's an added benefit if you plan to use the "resource name" as a
primary identifier for the entries, as you'll then be able to use
normal path resolution instead of a more expensive query to retrieve
an entry.

Another question though - which node type do I use to disallow same name siblings? I'm not quite keen on doing the File/Folder thing for some reason (maybe I should be?). I don't see any other node types that disallow same name siblings though. Does that mean I need to create my own node type? And if I create my own node type does that mean I have to do so via the Jackrabbit APIs? I don't see a way to do so via the JCR API.

- Dan

Dan Diephouse
http://mulesource.com | http://netzooid.com/blog