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

Error on creation only #20

Open
MohamedMaher5 opened this issue Aug 5, 2021 · 4 comments
Open

Error on creation only #20

MohamedMaher5 opened this issue Aug 5, 2021 · 4 comments

Comments

@MohamedMaher5
Copy link

Capture

@phoenix-lib
Copy link
Owner

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
Copy link
Author

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

@norhan-elnezamy
Copy link

norhan-elnezamy commented Apr 26, 2022

same issue with belongs to relation

@norhan-elnezamy
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants