KinglyEndeavors
PPrisma
•Created by KinglyEndeavors on 2/24/2025 in #help-and-questions
CUID Not Auto-Generating
I'm trying to write a seed script to populate my database with mock data, but for whatever reason, I'm getting a null constraint error for the primary key ('_id'), even though my schema is set to autogenerate this.
It generates them just fine within my actual app, but it's not for my seed script for whatever reason.
Any ideas? (Snippets in thread.)
13 replies
PPrisma
•Created by KinglyEndeavors on 7/3/2024 in #help-and-questions
Best Practices for Error Handling When Updating Bridge Table (Composite IDs)
What are the best practices when it comes to going about error handling for a function that is updating a bridge table?
Is it necessary to verify to check if the two records that comprises its composite ID (e.g.,
facilityUuid
for the Facility
model and workerUuid
for the Worker
model) before updating it? Or will it check for that on its own as a consequential result?
Here's are some snippet examples:
16 replies