# this is fine iex(1)> Ash.Changeset.for_create(Example.DeliveryStatus, :create, %{status: :in_progress, details: nil, platform: :platform_a, product_id: 123}) # this is not iex(2)> Ash.Changeset.for_create(Example.DeliveryStatus, :create, %{status: :in_progress, details: %{type: :platform_a, name: "something"}, platform: :platform_a, product_id: 123}) ** (Ash.Error.Invalid) Bread Crumbs: > Exception raised in: Example.PlatformADetails.create > building changeset for Example.DeliveryStatus.create Invalid Error * Identity :product_id_platform does not exist on resource Example.PlatformADetails. Available identities are: (ash 3.5.21) lib/ash/error/invalid/no_identity_found.ex:4: Ash.Error.Invalid.NoIdentityFound.exception/1 (ash 3.5.21) lib/ash/actions/create/create.ex:239: Ash.Actions.Create.commit/3 (ash 3.5.21) lib/ash/actions/create/create.ex:132: Ash.Actions.Create.do_run/4 (ash 3.5.21) lib/ash/actions/create/create.ex:50: Ash.Actions.Create.run/4 (manager 0.19.0) deps/ash/lib/ash/embeddable_type.ex:194: Example.PlatformADetails.cast_input/2 (ash 3.5.21) lib/ash/type/type.ex:1025: Ash.Type.cast_input/3 (ash 3.5.21) lib/ash/type/union.ex:781: Ash.Type.Union.try_cast_type/6 (elixir 1.18.4) lib/enum.ex:4968: Enumerable.List.reduce/3 (elixir 1.18.4) lib/enum.ex:2600: Enum.reduce_while/3 (ash 3.5.21) lib/ash/type/union.ex:711: Ash.Type.Union.cast_input/2 (manager 0.19.0) lib/example/example.ex:36: Example.Details.cast_input/2 (ash 3.5.21) lib/ash/type/type.ex:1025: Ash.Type.cast_input/3 (ash 3.5.21) lib/ash/changeset/changeset.ex:6214: Ash.Changeset.do_change_attribute/4 (stdlib 6.2.2) maps.erl:860: :maps.fold_1/4 (ash 3.5.21) lib/ash/changeset/changeset.ex:2706: Ash.Changeset.handle_params/4 (ash 3.5.21) lib/ash/changeset/changeset.ex:2543: Ash.Changeset.do_for_action/4 (elixir 1.18.4) src/elixir.erl:386: :elixir.eval_external_handler/3 (stdlib 6.2.2) erl_eval.erl:919: :erl_eval.do_apply/7 (elixir 1.18.4) src/elixir.erl:364: :elixir.eval_forms/4 (ash 3.5.21) lib/ash/actions/create/create.ex:239: Ash.Actions.Create.commit/3 (ash 3.5.21) lib/ash/actions/create/create.ex:132: Ash.Actions.Create.do_run/4 (ash 3.5.21) lib/ash/actions/create/create.ex:50: Ash.Actions.Create.run/4 (manager 0.19.0) deps/ash/lib/ash/embeddable_type.ex:194: Example.PlatformADetails.cast_input/2 (ash 3.5.21) lib/ash/type/type.ex:1025: Ash.Type.cast_input/3 (ash 3.5.21) lib/ash/type/union.ex:781: Ash.Type.Union.try_cast_type/6 (elixir 1.18.4) lib/enum.ex:4968: Enumerable.List.reduce/3 (elixir 1.18.4) lib/enum.ex:2600: Enum.reduce_while/3 (ash 3.5.21) lib/ash/type/union.ex:711: Ash.Type.Union.cast_input/2 (manager 0.19.0) lib/example/example.ex:36: Example.Details.cast_input/2 (ash 3.5.21) lib/ash/type/type.ex:1025: Ash.Type.cast_input/3 (ash 3.5.21) lib/ash/changeset/changeset.ex:6214: Ash.Changeset.do_change_attribute/4 (stdlib 6.2.2) maps.erl:860: :maps.fold_1/4 (ash 3.5.21) lib/ash/changeset/changeset.ex:2706: Ash.Changeset.handle_params/4 (ash 3.5.21) lib/ash/changeset/changeset.ex:2543: Ash.Changeset.do_for_action/4 iex:6: (file)