# `Ash.Resource.Identity`
[🔗](https://github.com/ash-project/ash/blob/v3.23.1/lib/ash/resource/identity.ex#L5)

Represents a unique constraint on a resource

Data layers should (and all built in ones do), discount `nil` or `null` (in the case of postgres) values
when determining if a unique constraint matches. This often means that you should
prefer to use identities with non-nullable columns.

Eventually, features could be added to support including `nil` or `null` values, but they would
need to include a corresponding feature for data layers.

# `t`

```elixir
@type t() :: %Ash.Resource.Identity{
  __spark_metadata__: Spark.Dsl.Entity.spark_meta(),
  all_tenants?: boolean(),
  description: String.t() | nil,
  eager_check?: term(),
  eager_check_with: term(),
  field_names: term(),
  keys: [atom()],
  message: term(),
  name: atom(),
  nils_distinct?: boolean(),
  pre_check?: term(),
  pre_check_with: term(),
  where: nil | Ash.Expr.t()
}
```

# `schema`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
