User's Manual

Chapter 11. Services Tutorials 141
11.5.5. PDL Syntax
To specify which object types should be versioned, developers can use the keywords versioned
and unversioned. Consider the following example.
versioned object type VT1 {
BigInteger[1..1] id = t_vt1.id INTEGER;
object key(id);
}
object type VT2 extends VT1 {
component UT3[0..n] ut3s = join t_vt2.id to t_ut3.vt2_id;
reference key(t_vt2.id);
}
object type C1 {
BigInteger[1..1] id = t_c1.id INTEGER;
A1[1..1] a1s = join t_c1.a1_id to t_a1.id;
component UT4[0..1] ut4 = join t_c1.ut4_id to t_ut4.id;
object key(id);
}
association {
VT2[0..1] vt2 = join t_c1.vt2_id to t_vt2.id;
component C1[0..n] c1s = join t_vt2.id to t_c1.vt2_id;
}
object type A1 {
BigInteger [1..1] id = t_a1.id INTEGER;
UT4[1..1] ut4 = join t_a1.ut4_id to t_ut4.id;
object key(id);
}
object type UT1 {
BigInteger[1..1] id = t_ut1.id INTEGER;
UT3[1..1] ut3attr = join t_ut1.ut3_id to t_ut3.id;
object key(id);
}
object type UT2 {
BigInteger[1..1] id = t_ut2.id INTEGER;
object key(id);
}
versioned object type VUT2 extends UT2 {
UT1[1..1] ut1 = join t_vut2.ut1id to t_ut1.id;
unversioned String[1..1] unverAttr = t_vut2.unver_attr VARCHAR;
unversioned component UT5[0..n] ut5 = join t_vut2.ut5id to t_ut5.id;
versioned UT6[0..n] ut6s = join t_vut2.ut6id to t_ut6.id;
reference key(t_vut2.id);
}
object type UT3 {
BigInteger[1..1] id = t_ut3.id INTEGER;
composite VT2[1..1] vt2 = join t_ut3.vt2_id to t_vt2.id;
object key(id);
}
object type UT4 {
BigInteger[1..1] id = t_ut4.id INTEGER;
object key(id);