Primary key as string (not UUID)
I have an existing table with a string key. In Ecto, this was generated in the changeset function. In the Ash documentation, there is only
integer_primary_key()
, and uuid_primary_key()
. If I try leaving either of those out, it returns an error that says I need to specify a primary key. How can this be made to work?5 Replies
Those two are helpers that generate attributes with sensible defaults for primary keys: https://ash-hq.org/docs/dsl/ash-resource#attributes-integer_primary_key
Okay, got it.
You can define your primary key manually without the helpers
Thank you.
No worries