jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boni Gopalan \(BioImagene\)" <Bon...@bioimagene.com>
Subject RE: OCM:To Path or Not to Path
Date Tue, 07 Oct 2008 10:30:30 GMT
IMO the only characteristics that can uniquely identify an object is the path.  So did the
'identity' of the object change when it moved from /drafts node to /final node? ; I feel it
did.  If we map the transaction to ORM what just happened is a table to table move.  

There seems to be a fundamental misunderstanding in the way Christophe is defining the OCM
structure and the way I have understood it.  I do not see that current implementation cares
too much about the identity specification through an uuid.  It likes a custom identity definition
supplied by the application.  That could be genesis of fields specified as id fields.  I completely
agree with this approach.  UUID: is a luxury provided by jackrabbit and OCM need not leverage
on it alone. If that is so do we need to provide the notion of a Sequence Generator from OCM?
: Through the annotation and through the mapping file.  This would be useful for the applications
to define a domain object as 'one with an id'.

<sequence-descriptor name = "FooSeq" type="String"/>
<class-descriptor className="com.bioimagene.iii.dms.domain.Foo">
	<field-descriptor fieldName="name" jcrName="name" jcrType="String"/>
	<field-descriptor fieldName="id" id="true" sequence="FooSeq"/>
</class-descriptor>

This will help the current implementation philosophy that uses id values to resolve the names
of same name siblings.  I do not know for sure but such a feature might straighten a few other
wrinkles that I feel I felt when using OCM.

Thanks
Boni 



-----Original Message-----
From: Aleksei Lukin [mailto:lukin@stu.cn.ua] 
Sent: 06 October 2008 22:39
To: users@jackrabbit.apache.org
Subject: Re: OCM:To Path or Not to Path

Hello, dear  Christophe !
Back to old discussion... :)

Sunday 05 October 2008 11:11:02 Christophe Lombart написав:
> My conclusion is if you see the OCM pojo classes similar to the JPA
> entities, the path becomes insteresting because the UUID is not mandatory.
> Otherwise, we have to specify the path into the OCM API see [1] ... but the
> discussion is always open :-)

UUID is not mandatory but always available as an option. Path is not consistent parameter,
e.g. I just move object from "drafts" to "published" content folder and path is changed
but UUID is still the same. So what is better? I prefer key that never changes for the same
object independend of object location.

So in my projects I make all OCM nodes mix:referenceable and use UUIDs everywhere.
We need path only when we place object at some location. Rest of situations covered by UUIDs.

Path is unque but not consistent key of node. If we compare it to primary key in the world
of relations, it does not allow reliable object retrival and can not be used as primary 
key. As I wrote before few month ago, UUID is only option for reliable analog of primary key
regardless it's optionality in JCR specification. I do not know JCR implementations 
that do not support UUIDs so it's not a problem to use UUID.


SY, Alex Lukin
RIPE NIC HDL: LEXA1-RIPE

Mime
View raw message