We refer to the previous implementations of the versioning package as the "old versioning". This includes implementations up to and including 5.2.x. If you have used the old versioning before, there is a number of key differences between old versioning and this implementation that you may want to be aware of.
The old versioning operates on the {@link
com.arsdigita.domain.DomainObject domain object} level. Only those
domain objects that subclass VersionedACSObject
used to
be versioned.
This implementation operates on the {@link com.arsdigita.persistence.DataObject data object} level. In order to make an object type versioned, its PDL definition must start with the "versioned" keyword, like so:
versioned object type Quux { BigInteger[1..1] id = quuces.id INTEGER; String[1..1] name = quuces.name VARCHAR; object type (id); }
Object types may also be versioned implicitly due to semantic constraints imposed by marking some other object type as "versioned". For example, a subtype of a versioned object type is also versioned.
object type GreatQuux extends Quux { String[0..1] email = great_quuces.email VARCHAR; component Foobar[0..n] foobars = join great_quuces.id to foobars.great_quux_id; reference key(great_quuces.id); }
In this example, the GreatQuux
object type is
versioned, because it extends a versioned type.
Components of a versioned type are also versioned. In the above
example, the Foobar
type is versioned, because it is a
component of the versioned object type GreatQuux
.
A more complete description of the supported PDL syntax and its intended semantics is outside the scope of this brief description. Please refer to the Developer Guide for further details.
About the only carryover from the old versioning is the {@link com.arsdigita.versioning.VersionedACSObject} class. It has been marked as deprecated. It may be removed in a future release. You should not be using or relying on any of the API provided by this class.
@see com.arsdigita.persistence