ash v1.24.1 Ash.Resource.Dsl.Identities.Identity View Source
Link to this section Summary
Link to this section Functions
Represents a unique constraint on the resource.
Used for indicating that some set of attributes, calculations or aggregates uniquely identify a resource.
This will allow these fields to be passed to
get(Resource, [some_field: 10]),
if all of the keys are filterable. Otherwise they are purely descriptive at the moment.
The primary key of the resource does not need to be listed as an identity.
identity :name, [:name]
identity :full_name, [:first_name, :last_name]
:name- The name of the identity. Used by extensions to target specific identities for fetching single instances of a resource
:keys- The names of attributes, aggregates or calculations that uniquely identify this resource.
:description- An optional description for the identity