<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKRecord/parent",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKRecord(py)parent"
  },
  "title" : "parent"
}
-->

# parent

A reference to the record’s parent record.

```
@NSCopying var parent: CKRecord.Reference? { get set }
```

## Discussion

Use parent references to inform CloudKit about the hierarchy of your records. CloudKit shares the hierarchy when a [`CKShare`](/documentation/CloudKit/CKShare) includes a referenced record. Add relationships between records as you create them, even if you don’t plan to share them. This allows you to manage the sharing of a hierarchy by only modifying the root record’s [`share`](/documentation/CloudKit/CKRecord/share) reference.

To indicate that a record belongs to its parent, set this property to a reference that points to the parent record. The reference must use the [`CKRecord.ReferenceAction.none`](/documentation/CloudKit/CKRecord/ReferenceAction/none) action or CloudKit throws an exception. The parent record must exist on the server when you save the child, or you must include the record in the same save operation. Otherwise, the operation fails.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)