Trying to get into Prisma; lots of hope and heartbreak
Hello! I've been trying to get into Prisma more and more because of the incredible promise and functionality it offers 99.9% of the time.
However, I've unfortunately been experiencing some heartbreaking issues that just don't seem to make sense.
I am running Node
18.13.0
compiled to js
on my server and 20.10.0
pure ts
on my pc. Both experience same issues.
My server is a Pi, running a minimal CLI OS (Can't remember which!)
My pc is running Lubuntu 22
Both my client and prisma are version 5.12.1
, but I've been on and off trying to use Prisma for the past over a year with same results/issues.
Here is one of them:
I've been experiencing this crippling mystery issue that I narrowed down to I believe use of upsert
, where it works for the longest time, but then one time out of 1000 maybe it completely explodes and no more Prisma calls work properly from there on until I restart my project. This issue appears to be fixed by manually findFirst
-> null check -> create
OR update
depending if existed
Another:
For some reason, when I try to create new entry using only id
and guild_id
, it complains that field item_id
is required and crashes. This yields the same results with upsert
or manual findFirst
etc....
I apologise in advance for not having any logs to share; I'll make sure to update this post when I have some again.
If you have anything that I could Possibly try to help me out, please do let me know!!
(PS I am not sure what the difference between ORM/Accelerate/Pulse are - I hope I picked it right! Apologies if not!)
Thank you! 💖![No description](https://cdn.answeroverflow.com/1237330466214772789/image.png)
6 Replies
Here's the unique id issue!
![No description](https://cdn.answeroverflow.com/1237330536960102461/image.png)
Why do I need id to be defined..? That's silly!!!
![No description](https://cdn.answeroverflow.com/1237330669734989835/image.png)
Why must it not be null..?
Isn't that the whole idea of autoincrement..?
I am so freakin confused...
If you pass it null Prisma will try and set it as such. If you want the field to be ignored whiel also still passing it it should be undefined
Well I didn't give it a null!
But thank you, I'll try to specify undefined!
Yeahhhh undefined doesn't work either :c
Oh my goodness.
No freakin way.
BigInt has been my biggest nemesis once again.
Oh that's annoying!! But I'm glad I Finally tracked down my issue!
BigInt is Soooo annoying!!