Relationship Model
Cloudaware uses Salesforce relationship primitives to model ownership hierarchies and runtime dependencies across assets. Knowing the pattern helps you pick the right traversal in SOQL and Graph.
Relationship Types
- Master‑Detail (MD): strong containment; child inherits ownership/security; parent delete cascades; enables roll‑up summaries on the master
- Lookup: flexible reference; parent/child lifecycles are independent; use dot notation for parent fields
- Junction (MD+MD): many‑to‑many via a link object holding two master‑detail fields to its parents
Terminology used in CMDB reports often maps to these primitives:
- Contains: hierarchical ownership (commonly master‑detail or required lookup)
- Depends On: runtime dependency (lookup)
- Connected To: network/attachment relationship (often junction)
Canonical Relationships
- Account → Resource (lookup)
- Example:
CA10__CaAwsInstance__clooks upCA10__CaAwsAccount__c
- Example:
- Application → Application Tier (master‑detail)
CA10__CaApplicationTier__c(detail) →CA10__CaApplication__c(master)
- Instance ↔ Volume (junction)
CA10__CaAwsInstanceVolumeLink__cwith two MDs pointing to Instance and Volume
- Resource ↔ Security Group (junction)
- Link objects capture many‑to‑many application of security groups to instances/interfaces
- Vulnerability → Source Object (lookup)
- Record‑type‑specific primary lookup: host, project, repo, etc.
- Kubernetes hierarchy (lookups)
- Cluster → Node/Namespace → Pod → Container/Workload (exact object set depends on
CA10Kpackage version)
- Cluster → Node/Namespace → Pod → Container/Workload (exact object set depends on
Traversal Patterns
- Child → Parent (lookup/MD):
SELECT Id, Parent__r.Name FROM Child__c - Parent → Children (subquery):
SELECT (SELECT Id FROM ChildRelationshipName) FROM Parent__c(child relationship name is defined on the lookup) - Many‑to‑many via junction: query the link object, or filter parent by
Id IN (SELECT Parent__c FROM Link__c WHERE OtherParent__c = '...')
tip
Prefer dot notation from child to parent for selective filters and to avoid large subqueries.
Lifecycle and Soft‑Delete
- Most asset objects use
CA10__creationDate__c(where provided) andCA10__disappearanceTime__cto track presence in the source system. - The normalized provider state (e.g.,
CA10__stateName__c,CA10__powerState__c,CA10__status__c) fields are used to indicate status/lifecycle state. - The filter “Active”
CA10__disappearanceTime__c = NULLcan be used in SOQL queries. - Junction rows follow the same convention and disappear when either side is removed in the source.