aesmail / aesmail/kaffy

[BUG] embedded_schema @primary_key false not supported

未關閉
#190 1 則留言 0 個 reaction 已指派 1 人 已被 @aesmail 認領 在 GitHub 檢視
bug
主要語言
Elixir
星號
1.4k
分支
171
PR 合併指標
30 天內沒有已合併 PR

描述

**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 💪

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。