Hi ,
Expected behavior
When having a table with 2 FK, I want the ID to be the one in the table and not a concatenation of 2 FK.
My issue seems strongly linked to this one.
Especially this portion of answer:
jeffladiray
Sep 16
[...] It seems that the id column is missing, which seems to correspond with the fact that you are getting a composite id instead of your default id.
Actual behavior
The model with 2 FK has a concatenation primary key, like 1|1
, and thus, can not be linked with anything (I have an error message when I want to link an entry to another model).
What I have tried
- Add the field
ID
as a PK in the model with 2 FK in order to force the primary be to not be composite id.`It works nicely but now I have to enter manually the ID each time. Not usable. - Add the field
ID
directly in the.forest-schema.json
file. It did not stay in my dev environment and was deleted each time. - Add a field
IdForestAdmin
in my Postgres Schema and add this field in the model as a PK. It works, but again, not usable.
Context
- Package Version:lumber-cli@3.9
- Express Version: 4.16.4
- Sequelize Version: 5.15.2
- forest-express-sequelize: 6.3.14