jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Harris" <michael.e.har...@gmail.com>
Subject restore a versionable file?
Date Sat, 16 Aug 2008 20:53:53 GMT
Hey all

so I can create a file with mixin type versionable and childnode
JCR_CONTENT.  I can version that file, my tests show that a VersionHistory
contains Version instances with child frozen node, the frozen nodes have
content with the appropriate data property values..  however, when I try to
restore that file I get an exception

org.springframework.dao.DataIntegrityViolationException: Constraint has been
violated; nested exception is
javax.jcr.nodetype.ConstraintViolationException:
/routers/1/2/3/testRollback-router/testRollback.txt: mandatory child node {
http://www.jcp.org/jcr/1.0}content does not exist

so, in my versioning I notice that the Version instances kept in the
VersionHistory have a child of type JCR_FROZENNODE.  the frozen node has the
JCR_CONTENT child.  So I feel like I need to pass the frozen node to the
fileNode to restore, however the restore method only takes a Version.

how to get around this?



-- 
---------------------
Michael Harris

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