Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] embedded_schema @primary_key false not supported #190

Open
andreragsilva opened this issue Dec 29, 2020 · 1 comment · Fixed by coletiv/kaffy#2 · May be fixed by #200
Open

[BUG] embedded_schema @primary_key false not supported #190

andreragsilva opened this issue Dec 29, 2020 · 1 comment · Fixed by coletiv/kaffy#2 · May be fixed by #200
Assignees
Labels
bug Something isn't working

Comments

@andreragsilva
Copy link

andreragsilva commented Dec 29, 2020

Versions Used
Kaffy: 0.9.0
Phoenix: 1.5.7
Elixir: 1.11.2

What's actually happening?
Creating a new resource of a schema that contains an embedded_schema without an id will result in an error key :id not found in ... (see screenshot below).

What should happen instead?
The create/update should not expect a primary_key or id key to be set for the embedded_schema if it was defined it should not use one.

Workaround
Removing the @primary_key false makes everything work properly but an Id field will be added to the form which I don't need.

Screenshots

Screenshot 2020-12-29 at 15 06 14

Screenshot 2020-12-29 at 15 04 47

Happy to help @aesmail, let me know if this makes sense or I am doing something I shouldn't 💪

@luka-TU
Copy link

luka-TU commented Dec 28, 2022

@aesmail Hi! Do you know if this is going to be adopted any time soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment