Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

DataModel by picking Attributes from other defined DataModel

We famously call such DataModel attributes as "Cherry Picked DataModelCherryPicked Attributes". Attributes They are "Cherry picked Picked" from the attributes of some other defined models.

CherryPicked attributes are defined as type of Attribute. The value is defined as the name of an attribute from another model.

In this example the DataModel SensorVendorInfo contains SensorVendorSysId, SensorVendorName defined and available in VendorInfo.

Code Block
languagexml
titleUnique Constraint Violation Error
linenumberstrue
<DataModel Name="VendorInfo">
  <Sid name="VendorSysId"/>
  <String name="VendorName"/>
  <String name="VendorTitle"/>
  <PostalAddress name="VendorAddress"/>
  <String Name="DeviceTypes" Cardinality="0..m"/>
  <Unique Name="UniqueVendorName" Value="VendorName"/>
</DataModel>
<DataModel name="SensorVendorInfo">
   <Attribute name="SensorVendorSysId" value="VendorInfo.VendorSysId"/>
   <Attribute name="SensorVendorName" value="VendorInfo.VendorName"/>
</DataModel>

...