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

Make scaffold generators use emptyAsUndefined #4354

Closed
Tobbe opened this issue Feb 2, 2022 · 2 comments · Fixed by #8031
Closed

Make scaffold generators use emptyAsUndefined #4354

Tobbe opened this issue Feb 2, 2022 · 2 comments · Fixed by #8031

Comments

@Tobbe
Copy link
Member

Tobbe commented Feb 2, 2022

The DMMF (Data Model Meta Format) we get from Prisma tells us if a field is a relational field to another model or not. We could use this information to set emptyAsUndefined on relevant form fields, instead of just relying on the "ends with Id"-naming convention.

This depends on #4353 being implemented first.

For more context:
PR: #4302
Issue: #4297

@samthuang
Copy link
Contributor

hello @Tobbe - I'd like to give this issue a try if no one is actively working on this 🙂

@thedavidprice
Copy link
Contributor

@samthuang if you're still interested, it would be great to have your help! Just an FYI that @Tobbe is traveling this week but I'll loop him in to check when he's back.

Feel free to start with a draft PR. Do loop in myself and Tobbe.

Lastly, I'm assuming you want to take this so I'm assigning to you now. Let me know otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants