Ash FrameworkAF
Ash Framework3y ago
6 replies
\ ឵឵឵

`bulk_create` requiring `upsert_fields` with `upsert?: true`

Small conflict between the docs and usage of bulk_create:

Docs: "If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written."
https://hexdocs.pm/ash/Ash.Api.html#c:bulk_create/4

The error:
** (ArgumentError) For bulk actions, `upsert_fields` must be specified if upsert? is set to true`
Was this page helpful?