Considering "versions" there are of type VERSION, and each VERSION has the "data" directly on them, this means the resulting VERSIONED_OBJECT could be potentially huge.
Though in the RM, VERSIONED_OBJECT doesn't have a direct link to versions, there are many methods to get them, but is not a relationship between classes.
The versions element could be dropped from the schema, IMO there should appear only the things that are associated by a relationship in the UML not by a method.
Since we have services in the API to get versions, I don't think it is a problem to remove the versions from the VERSIONED_OBJECT, we can get them anyway. Though current API services don't provide a way of getting all the versions in a VERSIONED_OBJECT, we could add that, which would simulate the VERSIONED_OBJECT.all_versions() method.
Current schema includes "versions" as part of VERSIONED_OBJECT elements:
<xs:complexType name="VERSIONED_OBJECT">
<xs:annotation>
<xs:documentation>Version control abstraction, defining semantics for versioning one complex object.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="uid" type="HIER_OBJECT_ID"/>
<xs:element name="owner_id" type="OBJECT_REF"/>
<xs:element name="time_created" type="DV_DATE_TIME"/>
<xs:element name="versions" type="VERSION" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>An ordered list of VERSIONs</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
https://github.com/openEHR/specifications-ITS-XML/blob/master/components/RM/Release-1.1.0/Common.xsd#L176
Considering "versions" there are of type VERSION, and each VERSION has the "data" directly on them, this means the resulting VERSIONED_OBJECT could be potentially huge.
Though in the RM, VERSIONED_OBJECT doesn't have a direct link to versions, there are many methods to get them, but is not a relationship between classes.
The versions element could be dropped from the schema, IMO there should appear only the things that are associated by a relationship in the UML not by a method.
Since we have services in the API to get versions, I don't think it is a problem to remove the versions from the VERSIONED_OBJECT, we can get them anyway. Though current API services don't provide a way of getting all the versions in a VERSIONED_OBJECT, we could add that, which would simulate the VERSIONED_OBJECT.all_versions() method.