You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Vikas Bhatia <vi...@gmail.com> on 2007/11/09 21:18:35 UTC
changing property of a checked in node
I have a node that is versionable. Here is the CND
===
[mcd:xy] > nt:base,mix:versionable
orderable mixin
- mcd:language (string) mandatory
- mcd:url (string)
- mcd:title (string) ignore mandatory
===
Here is the title is set to "ignore". After the node with this
nodetype xy is first created, we can change the title without checking
out the node. i.e., the title changing does not need the node to be
checked out.
But once a new version of node xy is created, lets say the new version
1.1, we cant change the property mcd:title without checking out the
node. if we try to change the title without checking out the node, the
error is
javax.jcr.version.VersionException: cannot set the value of a
checked-in node, /a/b/c/xyz:title
The behavior is confusing.. if the node is not versioned, you can
change the property, but once the first version is created, you
cannot... is that expected behavior. I thought that by setting the
title attribute to "ignore" you could change the property without
checking the node out.
Is this a bug or expected behavior?
V.
Re: changing property of a checked in node
Posted by Julian Reschke <ju...@gmx.de>.
Marcel Reutegger wrote:
> Julian Reschke wrote:
>> Vikas Bhatia wrote:
>>> The behavior is confusing.. if the node is not versioned, you can
>>> change the property, but once the first version is created, you
>>> cannot... is that expected behavior. I thought that by setting the
>>> title attribute to "ignore" you could change the property without
>>> checking the node out.
>>>
>>> Is this a bug or expected behavior?
>>
>> That sounds like a bug to me. You probably should open a JIRA issue,
>> optimally including a short test case.
>
> I think this is expected behaviour, the JSR 170 spec clearly says that
> the node and its properties become read-only after a checkin.
I think I now agree, except for the "clearly" :-)
> JSR 283 will allow to modify these kinds of properties. see page 283 in
> the public review version of JSR 283.
Yep.
I would consider this an erratum, as it is exactly what I would have
expected from the definition of OPV.IGNORE.
BR, Julian
Re: changing property of a checked in node
Posted by Marcel Reutegger <ma...@gmx.net>.
Julian Reschke wrote:
> Vikas Bhatia wrote:
>> The behavior is confusing.. if the node is not versioned, you can
>> change the property, but once the first version is created, you
>> cannot... is that expected behavior. I thought that by setting the
>> title attribute to "ignore" you could change the property without
>> checking the node out.
>>
>> Is this a bug or expected behavior?
>
> That sounds like a bug to me. You probably should open a JIRA issue,
> optimally including a short test case.
I think this is expected behaviour, the JSR 170 spec clearly says that the node
and its properties become read-only after a checkin.
JSR 283 will allow to modify these kinds of properties. see page 283 in the
public review version of JSR 283.
regards
marcel
Re: changing property of a checked in node
Posted by Julian Reschke <ju...@gmx.de>.
Vikas Bhatia wrote:
> I have a node that is versionable. Here is the CND
>
> ===
> [mcd:xy] > nt:base,mix:versionable
> orderable mixin
> - mcd:language (string) mandatory
> - mcd:url (string)
> - mcd:title (string) ignore mandatory
>
> ===
>
> Here is the title is set to "ignore". After the node with this
> nodetype xy is first created, we can change the title without checking
> out the node. i.e., the title changing does not need the node to be
> checked out.
>
> But once a new version of node xy is created, lets say the new version
> 1.1, we cant change the property mcd:title without checking out the
> node. if we try to change the title without checking out the node, the
> error is
>
> javax.jcr.version.VersionException: cannot set the value of a
> checked-in node, /a/b/c/xyz:title
>
> The behavior is confusing.. if the node is not versioned, you can
> change the property, but once the first version is created, you
> cannot... is that expected behavior. I thought that by setting the
> title attribute to "ignore" you could change the property without
> checking the node out.
>
> Is this a bug or expected behavior?
That sounds like a bug to me. You probably should open a JIRA issue,
optimally including a short test case.
BR, Julian