On Sun, May 6, 2012 at 9:46 AM, Lukas Kahwe Smith <[email protected]> wrote:
>
> On May 6, 2012, at 09:41 , Francisco Carriedo Scher wrote:
>
>> Hi there,
>>
>> in a given point after creating a nt:file node i need to change the node
>> type to nt:linkedFile. Sometimes such node will already have it's proper
>> sons (a node called jcr:content and property called jcr:data inside this
>> last one) and sometimes not.
>
>
> the JCR specification does not allow changing the primary node type once a 
> node has been created.

wrong, as of JCR 2.0 the primary node type of a node can be set [1].

cheers
stefan

[1] 
http://www.day.com/maven/jsr170/javadocs/jcr-2.0/javax/jcr/Node.html#setPrimaryType(java.lang.String)

> not sure if there is an established pattern for this case, but all you could 
> do is remove the old node and create a new node.
>
> regards,
> Lukas Kahwe Smith
> [email protected]
>
>
>

Reply via email to