One Logo Pool Ball
SwiftData · IOS API REFERENCE

Schema.Entity

class · iOS 17.0+ · SDK 27.1

final class Entity

An object that provides a blueprint for the associated model class.

Members (31)

get · iOS 17.0+

attributes

TypeScript
get attributes(): Array<Schema_Attribute>
Swift declaration
final var attributes: Set<Schema.Attribute>
set · iOS 17.0+

attributes

TypeScript
set attributes(value: Array<Schema_Attribute>)
Swift declaration
final var attributes: Set<Schema.Attribute>
get · iOS 17.0+

properties

TypeScript
get properties(): Array<SDKHandle>
Swift declaration
final var properties: [any SchemaProperty] { get }
get · iOS 17.0+

subentities

TypeScript
get subentities(): Array<Schema_Entity>
Swift declaration
final var subentities: Set<Schema.Entity>
set · iOS 17.0+

subentities

TypeScript
set subentities(value: Array<Schema_Entity>)
Swift declaration
final var subentities: Set<Schema.Entity>
get · iOS 17.0+

superentity

TypeScript
get superentity(): (Schema_Entity) | null
Swift declaration
final var superentity: Schema.Entity? { get set }
set · iOS 17.0+

superentity

TypeScript
set superentity(value: (Schema_Entity) | null)
Swift declaration
final var superentity: Schema.Entity? { get set }
get · iOS 17.0+

relationships

TypeScript
get relationships(): Array<Schema_Relationship>
Swift declaration
final var relationships: Set<Schema.Relationship>
set · iOS 17.0+

relationships

TypeScript
set relationships(value: Array<Schema_Relationship>)
Swift declaration
final var relationships: Set<Schema.Relationship>
get · iOS 17.0+

superentityName

TypeScript
get superentityName(): (string) | null
Swift declaration
final var superentityName: String?
set · iOS 17.0+

superentityName

TypeScript
set superentityName(value: (string) | null)
Swift declaration
final var superentityName: String?
get · iOS 17.0+

attributesByName

TypeScript
get attributesByName(): Record<string, Schema_Attribute>
Swift declaration
final var attributesByName: [String : Schema.Attribute]
set · iOS 17.0+

attributesByName

TypeScript
set attributesByName(value: Record<string, Schema_Attribute>)
Swift declaration
final var attributesByName: [String : Schema.Attribute]
get · iOS 17.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
final var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

get · iOS 17.0+

storedProperties

TypeScript
get storedProperties(): Array<SDKHandle>
Swift declaration
final var storedProperties: [any SchemaProperty] { get set }
set · iOS 17.0+

storedProperties

TypeScript
set storedProperties(value: Array<SDKHandle>)
Swift declaration
final var storedProperties: [any SchemaProperty] { get set }
get · iOS 17.0+

inheritedProperties

TypeScript
get inheritedProperties(): Array<SDKHandle>
Swift declaration
final var inheritedProperties: [any SchemaProperty] { get set }
set · iOS 17.0+

inheritedProperties

TypeScript
set inheritedProperties(value: Array<SDKHandle>)
Swift declaration
final var inheritedProperties: [any SchemaProperty] { get set }
get · iOS 17.0+

relationshipsByName

TypeScript
get relationshipsByName(): Record<string, Schema_Relationship>
Swift declaration
final var relationshipsByName: [String : Schema.Relationship]
set · iOS 17.0+

relationshipsByName

TypeScript
set relationshipsByName(value: Record<string, Schema_Relationship>)
Swift declaration
final var relationshipsByName: [String : Schema.Relationship]
get · iOS 17.0+

uniquenessConstraints

TypeScript
get uniquenessConstraints(): Array<Array<string>>
Swift declaration
final var uniquenessConstraints: [[String]]
set · iOS 17.0+

uniquenessConstraints

TypeScript
set uniquenessConstraints(value: Array<Array<string>>)
Swift declaration
final var uniquenessConstraints: [[String]]
get · iOS 17.0+

storedPropertiesByName

TypeScript
get storedPropertiesByName(): Record<string, SDKHandle>
Swift declaration
final var storedPropertiesByName: [String : any SchemaProperty]
set · iOS 17.0+

storedPropertiesByName

TypeScript
set storedPropertiesByName(value: Record<string, SDKHandle>)
Swift declaration
final var storedPropertiesByName: [String : any SchemaProperty]
get · iOS 17.0+

inheritedPropertiesByName

TypeScript
get inheritedPropertiesByName(): Record<string, SDKHandle>
Swift declaration
final var inheritedPropertiesByName: [String : any SchemaProperty]
set · iOS 17.0+

inheritedPropertiesByName

TypeScript
set inheritedPropertiesByName(value: Record<string, SDKHandle>)
Swift declaration
final var inheritedPropertiesByName: [String : any SchemaProperty]
get · iOS 17.0+

name

TypeScript
get name(): string
Swift declaration
final var name: String
set · iOS 17.0+

name

TypeScript
set name(value: string)
Swift declaration
final var name: String
get · iOS 18.0+

indices

TypeScript
get indices(): Array<Array<string>>
Swift declaration
final var indices: [[String]]
set · iOS 18.0+

indices

TypeScript
set indices(value: Array<Array<string>>)
Swift declaration
final var indices: [[String]]
init · iOS 17.0+

init

TypeScript
static init(name: string): Schema_Entity
Swift declaration
init(_ name: String)

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

Schema.Entity.init(_:subentities:properties:)

A variable number of Swift arguments is not supported.

Schema.Entity.init(_:properties:)

A variable number of Swift arguments is not supported.

All SwiftData types →