Class <Type> SchemaArrayField

public

Represents a field whose value is an array of objects with a well-defined structure described by a non-resource schema.

If the array's elements are not well-defined, use 'array' instead.

Show:

The kind of field this is.

The name of the field.

Options for configuring the behavior of the SchemaArray.

  • key

Configures how the SchemaArray determines whether an object in the cache is the same as an object previously used to instantiate one of the schema-objects it contains.

The default is '@identity'.

Valid options are:

  • '@identity' (default) : the cached object's referential identity will be used. This may result in significant instability when resource data is updated from the API

  • '@index' : the cached object's index in the array will be used. This is only a good choice for arrays that rarely if ever change membership

  • '@hash' : will lookup the @hash function supplied in the ResourceSchema for The contained schema-object and use the computed result to determine and compare identity.

  • (string) : the name of a field to use as the key, only GenericFields (kind field) Are valid field names for this purpose. The cache state without transforms applied will be used when comparing values. The field value should be unique enough to guarantee two schema-objects of the same type will not collide.

  • polymorphic : Whether this SchemaArray is Polymorphic.

  • type : If the SchemaArray is Polymorphic, the key on the raw cache data to use as the "resource-type" value for the schema-object.

The name of the ObjectSchema that describes the structure of the objects in the array.