incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Lombart <christophe.lomb...@gmail.com>
Subject Re: Re[2]: [jcr-mapping] Mapping Node.getPath() to domain objects
Date Tue, 11 Oct 2005 05:38:04 GMT
On 10/10/05, Costin Leau <costin.leau@gmail.com> wrote:
>
>
>
> > for describing unique identifier we can have something like that:
> > <path fieldName="path">
> > </path>
> I would differ - the path can also be viewed as being a different
> table. The path is not part of the object content so it shouldn't be
> treated as one.
> The database impose the object to have an id - a special field. Note
> that it doesn't have to be a unique id over the database - smth that
> would happen if the path is considered as part of the object.
> The most approapriate method would be to require and id from the user
> which can be generated or supplied by him/her.
> This way the developer can chose if she/he wants a long/int or a
> String UUID. Creating syntetic attributes based on an object will fail
> eventually (for example if I move the path the object identity changes
> - in the database world if I rename an object the identity is the
>
same).


In summary, we have 3 possibilities :

<class-descriptor
className="org.apache.portals.graffito.jcr.testmodel.Atomic"
jcrNodeType="nt:unstructured">
<field-descriptor fieldName="myId" jcrName="myId" id = 'true'/>
.... other field, beans and collection descriptor ...
</class-descriptor>


<class-descriptor
className="org.apache.portals.graffito.jcr.testmodel.Atomic"
jcrNodeType="nt:unstructured">
<field-descriptor fieldName="myId" jcrName="UUID" id = 'true'/>
.... other field, beans and collection descriptor ...
</class-descriptor>


<class-descriptor
className="org.apache.portals.graffito.jcr.testmodel.Atomic"
jcrNodeType="nt:unstructured">
<field-descriptor fieldName="myId" jcrName="PATH" id = 'true'
sameNameSibling="false" />
.... other field, beans and collection descriptor ...
</class-descriptor>


Is the first one is still insteresting ? because we can replace it by UUID.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message