Dbugger
PPrisma
•Created by Dbugger on 6/10/2024 in #help-and-questions
Getting total count of records with one Query
Is it possible to get a
_count
of all records when doing a .findMany()
query, without having to do a second .count()
query?
I know it works for relationships, but I dont know how it works for simple queries.2 replies
PPrisma
•Created by Dbugger on 6/7/2024 in #help-and-questions
I can't disconnect a many-to-many relationship
Disconnecting the previous contact relationships is giving me a lot of headache. What's wrong with this statement?
3 replies
PPrisma
•Created by Dbugger on 5/11/2024 in #help-and-questions
Refactoring schema
I have the following schema:
Both the logos and Attachment are the same thing: files. So I thought that maybe I should refactor it, into the same table, but then apparently I am forced to do this
Which seems like a waste, because now the model File will need to update, everytime there is a new model that references the file. It does not scale well.
What would be the best way to optimize my Schema?
4 replies