You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Anirvan Majumdar <an...@taxilalab.com> on 2009/01/16 08:49:16 UTC
Node UUID value
Hello everyone,
I am facing a rather strange problem, most probably due to a lack of
understanding of the internals of JackRabbit's node creation logic.
In my repository, I had a particular Node which didn't have the mixin
type "referenceable". Due to subsequent changes in requirements, I
needed to access this node using its UUID. I changed my node-types
definition file and added the required mixin type to the node definition.
Thereafter, I am seeing a strange behaviour - once the JCR
repository is brought up, node.getUUID() returns me a value as expected.
However, the node does NOT have the mandatory property "jcr:uuid" set. I
also saw that doing a node.save() results in the setting of the jcr:uuid
property.
Can anyone explain me the logic behind this kind of a implementation.
Thanks!
Anirvan
Re: Node UUID value
Posted by Anirvan Majumdar <an...@taxilalab.com>.
Stefan Guggisberg wrote:
> yes
Thanks a lot Stefan!
Re: Node UUID value
Posted by Stefan Guggisberg <st...@gmail.com>.
On Fri, Jan 16, 2009 at 11:10 AM, Anirvan Majumdar
<an...@taxilalab.com> wrote:
> Stefan Guggisberg wrote:
>>
>> manually editing node type definitions is not supported. mix:referenceable
>> does
>> declare the jcr:uuid property. since you manually added mix:referenceable
>> to an existing type, nodes created with the old definition will not
>> have this property.
>>
>> cheers
>> stefan
>
> In that case, if I were to programmatically add the mixin type
> "referenceable" to the older existing node, will that work?
yes
>
> Anirvan
>
Re: Node UUID value
Posted by Anirvan Majumdar <an...@taxilalab.com>.
Stefan Guggisberg wrote:
> manually editing node type definitions is not supported. mix:referenceable does
> declare the jcr:uuid property. since you manually added mix:referenceable
> to an existing type, nodes created with the old definition will not
> have this property.
>
> cheers
> stefan
In that case, if I were to programmatically add the mixin type
"referenceable" to the older existing node, will that work?
Anirvan
Re: Node UUID value
Posted by Stefan Guggisberg <st...@gmail.com>.
On Fri, Jan 16, 2009 at 8:49 AM, Anirvan Majumdar
<an...@taxilalab.com> wrote:
> Hello everyone,
>
> I am facing a rather strange problem, most probably due to a lack of
> understanding of the internals of JackRabbit's node creation logic.
>
> In my repository, I had a particular Node which didn't have the mixin type
> "referenceable". Due to subsequent changes in requirements, I needed to
> access this node using its UUID. I changed my node-types definition file and
> added the required mixin type to the node definition.
>
> Thereafter, I am seeing a strange behaviour - once the JCR repository is
> brought up, node.getUUID() returns me a value as expected. However, the node
> does NOT have the mandatory property "jcr:uuid" set. I also saw that doing a
> node.save() results in the setting of the jcr:uuid property.
>
> Can anyone explain me the logic behind this kind of a implementation.
manually editing node type definitions is not supported. mix:referenceable does
declare the jcr:uuid property. since you manually added mix:referenceable
to an existing type, nodes created with the old definition will not
have this property.
cheers
stefan
>
> Thanks!
> Anirvan
>