Versions Compared

Key

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

...

Once VendorInfo Data is created using Create TQL Query. The SensorVendorInfo will automatically have the Data as well. 

Note that Data can be create in opposite direction as well i.e. Once created in SensorVendorInfo the common attributes will be available in VendorInfo as well.

Create VendorInfo Data:

Code Block
languagexml
titleUnique Constraint Violation ErrorCreate Vendor Info
linenumberstrue
<Query>
  <Create>
    <VendorInfo>
      <vendorName>Phidget</vendorName>
      <vendorTitle>Sensor Provider</vendorTitle>
      <vendorAddress>
        <Street>123 TQL Way</Street>
        <City>Sunnyvale</City>
        <Zipcode>91234</Zipcode>
      </vendorAddress>
      <DeviceTypes>Sensors</DeviceTypes>
      <DeviceTypes>Actuators</DeviceTypes>
    </VendorInfo>
  </Create>
</Query>

...

Code Block
languagexml
titleFind Result of DataModel with Cherry picked Attributes
linenumberstrue
<Find Status="Success">
  <Result>
    <SensorVendorInfo>
      <SensorVendorSysId>chag3vw7tcet7dvg2athubjwl2gvth73</SensorVendorSysId>
      <SensorVendorName>Phidget</SensorVendorName>
    </SensorVendorInfo>
  </Result>
</Find>

Note that Data can be created in opposite direction as well i.e. Once created in SensorVendorInfo the common attributes will be available in VendorInfo as well.

Code Block
languagexml
titleCreate SensorVendor Info
linenumberstrue
<Create>
  <SensorVendorInfo>
        <SensorVendorName>Phidget2</SensorVendorName>   
  </SensorVendorInfo>
</Create>
<!-- Lets Find from VendorInfo -->
<Find>
  <VendorInfo>
     <VendorName eq="Phidget2"/>
  </VendorInfo>
</Find>
<!-- Here is Find Result -->
<Find Status="Success">
  <Result>
    <VendorInfo>
      <VendorSysId>KP3XJHCLAAAAUAABBN4HSJE7</VendorSysId>
      <VendorName>Phidget2</VendorName>
    </VendorInfo>
  </Result>
  <Result>
    <VendorInfo>
      <VendorSysId>chag3vw7tcet7dvg2athubjwl2gvth73</VendorSysId>
      <DeviceTypes>Sensors</DeviceTypes>
      <DeviceTypes>Actuators</DeviceTypes>
      <VendorAddress>
        <City>Sunnyvale</City>
        <Street>123 TQL Way</Street>
        <Zipcode>91234</Zipcode>
      </VendorAddress>
      <VendorTitle>Sensor Provider</VendorTitle>
      <VendorName>Phidget</VendorName>
    </VendorInfo>
  </Result>
</Find>

DataModel by picking Attributes from other defined DataModel + newly defined Attributes

...