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: [jcr-mapping] Mapping Node.getPath() to domain objects
Date Mon, 10 Oct 2005 14:06:08 GMT
On 10/10/05, Martin Koci <martin.koci@aura.cz> wrote:
>
> When inserting new object into repository on existing path new node with
> [] index is created:
>
> Assume node /Document And Sesstings/file.txt exists:
>
> pm.insert("/Document And Sesstings/file.txt", entity) creates new node
> with path /Document And Sesstings/file.txt[1] - that is correct.
>
> But I want set newly inserted path on inserted entity:
> entity.getPath() should return /Document And Sesstings/file.txt[1]
>
> Is it possible?


No but I think that we have to support this feature.

Is path to node saved in special property ?


No. Costin suggest also to store the path in the mapping config file and
have method calls like :

myObject.setPath();
pm.instert(myObject)

<class-descriptor className="cz.aura.admis.domain.Document"
> jcrNodeType="admis:document" >
> <field-descriptor fieldName="path"
> jcrName="PATH_PROPERTY_NAME"></field-descriptor> ???
> <field-descriptor fieldName="creationDate"
> jcrName="jcr:created"></field-descriptor>
> <bean-descriptor fieldName="documentStream" proxy="false"
> jcrName="jcr:content"></bean-descriptor>
> </class-descriptor>



Good suggestion.

I will try to fix thoses issues this week
Thanks
Christophe

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