phoenix-lib / nova-nested-tree-attach-many

MIT License
35 stars 14 forks source link

Error on creation only #20

Open MohamedMaher5 opened 3 years ago

MohamedMaher5 commented 3 years ago

Capture

phoenix-lib commented 3 years ago

Hi i think your column category_id in ads table does not have a nullable criteria and when the record is created this column is empty.

Make that column NULLABLE and the problem goes away.

MohamedMaher5 commented 3 years ago

I already select category from field and I don't want make category_id nullable

norhan-elnezamy commented 2 years ago

same issue with belongs to relation

norhan-elnezamy commented 2 years ago

After tracking the creation behavior in case of using belongs to relation you should enable nullable option for your relationship foreign key as it's attached after the model creation.