jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: Copy versionable node to a standard one (non-versionable)
Date Wed, 30 Nov 2011 14:01:04 GMT
On 30.11.11 13:49, "VitalyL" <VitalyLA@gmail.com> wrote:
>/workspace.copy(path, destPath);
>...
>copy.removeMixin(JcrConstants.MIX_VERSIONABLE);/
>
>With 2.2.9 it throws javax.jcr.nodetype.ConstraintViolationException: no
>matching property definition found for
>{http://www.jcp.org/jcr/1.0}isCheckedOut
>
>So, the main question: how to create a copy without any version
>information?

I don't know if that is bug (i.e. I think removeMixin should probably
remove it's properties such as jcr:isCheckedOut automatically, but I am
not sure).

As a workaround you can copy the node and properties "manually" (ie.
getProperty + setProperty) and excluding the versioning properties
altogether (and not setting the mix:versionable on the target node).

Cheers,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel





Mime
View raw message