You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by JavaJ <po...@yahoo.com> on 2006/08/16 02:08:41 UTC

Question about versioning

I have a question about versioning.

NodeA has 2 child nodes NodeB and NodeC
NodeA and NodeC is versionable.  NodeB is not.

If I check out NodeA, can I start making changes to NodeA and all of its
children, including NodeC?  Then save and checkin NodeA?  If so, will I get
a Version that includes NodeA, NodeB and NodeC?  Or do I need to checkout
and version NodeC seperately?  e.g. NodeA and NodeC have completely seperate
version histories that don't include each other?


-- 
View this message in context: http://www.nabble.com/Question-about-versioning-tf2112332.html#a5824370
Sent from the Jackrabbit - Users forum at Nabble.com.


Re: Question about versioning

Posted by JavaJ <po...@yahoo.com>.
I have a couple of other questions about versioning:

1) Is there a way to "rollback" to a previous version?  I know that there is
a "restore" function, but from the spec, it looks like it just copies the
state of the versioned node into the node object.  What I'm interested in is
being able to rollback to a previous version V and then basically remove all
successor versions of V, making V the most recent version for the node.

2) What happens when you version a node with a reference property that
points to another node?  I assume that the only thing that gets versioned is
just the uuid of the referenced node?  So basically it doesn't keep the
state of the referenced node at the time you versioned the node?  For
example, if you have NodeA with a property R1 that references NodeB.  You
modify and checkin a new version V1 of NodeA.  Next, you modify NodeB and
save it.  Then you modify and checking a new version V2 of NodeA.  If you
then decide to restore NodeA to version V1 and get property R1, will that
node contain the state of the current version of NodeB or its state when V1
was first created (e.g before you modified it)?

-- 
View this message in context: http://www.nabble.com/Question-about-versioning-tf2112332.html#a5836552
Sent from the Jackrabbit - Users forum at Nabble.com.


Re: Question about versioning

Posted by JavaJ <po...@yahoo.com>.
Yes, I was reading the spec last night and it cleared up a lot of things.  To
answer my own questions:

- NodeC and NodeA have seperate version histories
- if NodeC is declared as onParentVersion=COPY, the its state will be
persisted as part of the "frozen" node of NodeA when it is versioned.
- checking out NodeA does not automatically check out NodeC.  you will need
to check it out seperately if you wanted to modify it.

I think this is correct.  Can someone confirm?  Also, I assume Jackrabbit
conforms to this spec pretty accurately?

Thanks.


Doug Douglass-2 wrote:
> 
> Amending my prior post, the spec is probably the best reference for the
> on-parent-version values.
> 
> On 8/15/06, Doug Douglass <do...@gmail.com> wrote:
>>
>> I can't answer all of your questions, and I'm looking for a some decent
>> docs in this area that bridge the gap between the Jackrabbit CND docs and
>> the specification, but in regards to whether the new version of NodeA
>> will
>> have child nodes NodeB and NodeC, this depends on how the child nodes are
>> declared in the NodeTypeDefinition for NodeA.
>>
>> There are 6 "on-parent-version" attributes for both child nodes and
>> properties that control the behavior when a new version of the parent
>> node
>> is created:
>>
>>   1. COPY
>>   2. VERSION
>>   3. INITIALIZE
>>   4. COMPUTE
>>   5. IGNORE
>>   6. ABORT
>>
>> I have yet to find a good source of docs for the meaning of each of the
>> above, but I'm pretty confident that if you wanted the new version of
>> NodeA
>> to have the same NodeB as the prior version of NodeA, then the
>> declaration
>> of NodeB in the NodeTypeDefinition for NodeA should contain COPY.
>>
>> HTH and if I'm wrong or anyone has pointers to good docs PLEASE enlighten
>> me.
>>
>> Doug
>>
>>
>> On 8/15/06, JavaJ < ponfar99@yahoo.com> wrote:
>> >
>> >
>> > I have a question about versioning.
>> >
>> > NodeA has 2 child nodes NodeB and NodeC
>> > NodeA and NodeC is versionable.  NodeB is not.
>> >
>> > If I check out NodeA, can I start making changes to NodeA and all of
>> its
>> > children, including NodeC?  Then save and checkin NodeA?  If so, will I
>> > get
>> > a Version that includes NodeA, NodeB and NodeC?  Or do I need to
>> > checkout
>> > and version NodeC seperately?  e.g. NodeA and NodeC have completely
>> > seperate
>> > version histories that don't include each other?
>> >
>> >
>> > --
>> > View this message in context:
>> > http://www.nabble.com/Question-about-versioning-tf2112332.html#a5824370
>> > Sent from the Jackrabbit - Users forum at Nabble.com.
>> >
>> >
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Question-about-versioning-tf2112332.html#a5835970
Sent from the Jackrabbit - Users forum at Nabble.com.


Re: Question about versioning

Posted by Doug Douglass <do...@gmail.com>.
Amending my prior post, the spec is probably the best reference for the
on-parent-version values.

On 8/15/06, Doug Douglass <do...@gmail.com> wrote:
>
> I can't answer all of your questions, and I'm looking for a some decent
> docs in this area that bridge the gap between the Jackrabbit CND docs and
> the specification, but in regards to whether the new version of NodeA will
> have child nodes NodeB and NodeC, this depends on how the child nodes are
> declared in the NodeTypeDefinition for NodeA.
>
> There are 6 "on-parent-version" attributes for both child nodes and
> properties that control the behavior when a new version of the parent node
> is created:
>
>   1. COPY
>   2. VERSION
>   3. INITIALIZE
>   4. COMPUTE
>   5. IGNORE
>   6. ABORT
>
> I have yet to find a good source of docs for the meaning of each of the
> above, but I'm pretty confident that if you wanted the new version of NodeA
> to have the same NodeB as the prior version of NodeA, then the declaration
> of NodeB in the NodeTypeDefinition for NodeA should contain COPY.
>
> HTH and if I'm wrong or anyone has pointers to good docs PLEASE enlighten
> me.
>
> Doug
>
>
> On 8/15/06, JavaJ < ponfar99@yahoo.com> wrote:
> >
> >
> > I have a question about versioning.
> >
> > NodeA has 2 child nodes NodeB and NodeC
> > NodeA and NodeC is versionable.  NodeB is not.
> >
> > If I check out NodeA, can I start making changes to NodeA and all of its
> > children, including NodeC?  Then save and checkin NodeA?  If so, will I
> > get
> > a Version that includes NodeA, NodeB and NodeC?  Or do I need to
> > checkout
> > and version NodeC seperately?  e.g. NodeA and NodeC have completely
> > seperate
> > version histories that don't include each other?
> >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Question-about-versioning-tf2112332.html#a5824370
> > Sent from the Jackrabbit - Users forum at Nabble.com.
> >
> >
>

Re: Question about versioning

Posted by Doug Douglass <do...@gmail.com>.
I can't answer all of your questions, and I'm looking for a some decent docs
in this area that bridge the gap between the Jackrabbit CND docs and the
specification, but in regards to whether the new version of NodeA will have
child nodes NodeB and NodeC, this depends on how the child nodes are
declared in the NodeTypeDefinition for NodeA.

There are 6 "on-parent-version" attributes for both child nodes and
properties that control the behavior when a new version of the parent node
is created:

  1. COPY
  2. VERSION
  3. INITIALIZE
  4. COMPUTE
  5. IGNORE
  6. ABORT

I have yet to find a good source of docs for the meaning of each of the
above, but I'm pretty confident that if you wanted the new version of NodeA
to have the same NodeB as the prior version of NodeA, then the declaration
of NodeB in the NodeTypeDefinition for NodeA should contain COPY.

HTH and if I'm wrong or anyone has pointers to good docs PLEASE enlighten
me.

Doug

On 8/15/06, JavaJ <po...@yahoo.com> wrote:
>
>
> I have a question about versioning.
>
> NodeA has 2 child nodes NodeB and NodeC
> NodeA and NodeC is versionable.  NodeB is not.
>
> If I check out NodeA, can I start making changes to NodeA and all of its
> children, including NodeC?  Then save and checkin NodeA?  If so, will I
> get
> a Version that includes NodeA, NodeB and NodeC?  Or do I need to checkout
> and version NodeC seperately?  e.g. NodeA and NodeC have completely
> seperate
> version histories that don't include each other?
>
>
> --
> View this message in context:
> http://www.nabble.com/Question-about-versioning-tf2112332.html#a5824370
> Sent from the Jackrabbit - Users forum at Nabble.com.
>
>