Type alias BaseObjectSchema

BaseObjectSchema: {
    asymmetric?: boolean;
    embedded?: boolean;
    name: string;
    primaryKey?: string;
    properties: unknown;
}

The schema for specifying the type of Realm object.

Type declaration

  • Optional asymmetric?: boolean

    Whether the object is used in asymmetric sync. An object that is asymmetrically synced is not stored locally and cannot be accessed locally. Querying such objects will throw an error. This is useful for write-heavy applications that only need to get data from devices to the cloud fast.

    Default value: false.

  • Optional embedded?: boolean

    Whether the object is embedded. An embedded object always belongs to exactly one parent object and is deleted if its parent is deleted.

    Default value: false.

  • name: string

    The name of the Realm object type. The name must be unique across all objects within the same Realm.

  • Optional primaryKey?: string

    The name of the property in properties that is used as the primary key. The value of that property must be unique across all objects of this type within the same Realm.

  • properties: unknown

    The properties and their types belonging to this object.

Generated using TypeDoc