jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Lukin <lu...@stu.cn.ua>
Subject OCM: path as primary key is questionable
Date Sun, 16 Mar 2008 19:02:20 GMT
Hi, All, hi, dear Cristphe!
I know you are busy and I know I'm asking of impossible :)

But I want to start discussion again.

You use path as equivalent of primary key for OCM. I found a lot of incosistences in my appication
that caused by such questionable approach.
For instance, if I have some OCM mapped node with some "bean" subnodes and then get subnode
by search operation, I can not update it because it's path
is relative to top node. Things go even worse if I try to move nodes.
JCR does not have concept of "undreakable subtree" so operations based on relative path will
ever cause inconsistence.
Another thihng that causes incovinience that I must define some property as (path=true) even
if I do not need path.

JCR has some features that keeps links and other things consistent. Those features I belive
not based on path but on UUID.

So question is: why not to use UUID as primary key for OCM? In my opinion it is only one reliable
key in JCR. OCM code may just force all OCM nodes to have
jcr:uuid property and relay on it.
SY, Alex Lukin

View raw message