jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kenclark <kencl...@snet.net>
Subject How do I make a first version when versioning?
Date Mon, 22 Sep 2008 04:05:52 GMT

I am working on a simple use case of storing nt:file nodes as versions.

Every time a new file is added, I keep track of who did it and what the file
name was at the time.

When the first file node is added to the system, it automatically creates
the root version.  However, this version does not seem to have as the
"jcr:frozenNode" child the real nt:file node that was just added.  For all
the other versions added subsequently using checkout() and checkin(), I can
traverse to the nt:file node and retrieve its properties (author and file
name) and then further traverse to the jcr:content node to get its
properties as well.  When I do this on the root version, the jcr:frozenNode
child just seems to be an empty node.

What is the correct way to code this?  Should I plan on doing a checkin() at
the same time as saving the original node (after the save), or is there
another way to do this properly?

I have tried calling checkin() immediately after saving the new node, but am
running into technical difficulties with that -- I covered this in another
post:  

http://www.nabble.com/Problem-with-node.checkin%28%29-in-same-transaction-node-was-created-td19601525.html

Thanks,
ken clark
-- 
View this message in context: http://www.nabble.com/How-do-I-make-a-first-version-when-versioning--tp19601595p19601595.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message