-
Notifications
You must be signed in to change notification settings - Fork 48
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
Cannot edit record on model with two primary keys #210
Comments
Hi @dynamiccast, Nice to see you there ;). Composite primary keys is something Forest is supposed to handle well, but your issue shows that I am wrong... We'll try to prioritise this fix. |
Hi ForestAdmin team! How this issue is going? -- EDIT There is a work around. If you create a identity field on the table with 2 pk (I called it 'id_forest_admin') and change the pk of the model to be the new key, it is working. |
Hi ForestAdmin team, We also experiment with this issue with our models with 2 Primary keys but with different behaviour.
Do you have an ETA for a fix? Since 2018 I think it's time now :) |
Hi @killix, |
Expected behavior
Forest should be able to update records even if model has multiple primary keys.
Actual behavior
On models with multiple primary keys, updates requests are wrongly crafted.
The id field (my first PK) appears as a concatenation of my two PK in Forest.
This id field is expected to be a uuid format and feeding the concatenation triggers an error in sequelize.
Failure Logs
Context
Here is my model:
The
id
field is shown as a concatenation ofid
andname
(my two primary keys) in Forest:The text was updated successfully, but these errors were encountered: