<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSRelationshipDescription/minCount",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSRelationshipDescription(py)minCount"
  },
  "title" : "minCount"
}
-->

# minCount

The minimum number of managed objects the relationship can reference.

```
var minCount: Int { get set }
```

## Discussion

If you declare a relationship attribute as optional when defining your entities, the framework only enforces [`minCount`](/documentation/CoreData/NSRelationshipDescription/minCount) and [`maxCount`](/documentation/CoreData/NSRelationshipDescription/maxCount) when that attribute is not `nil`.

The default value is `0`.

---

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)