Winter
Winter
DTDrizzle Team
Created by Tenkes on 9/22/2024 in #help
PostgresError: foreign key constraint "product_categories_category_id_fk" cannot be implemented
If at all possible you should wrap your delete's within a transaction
14 replies
DTDrizzle Team
Created by Tenkes on 9/22/2024 in #help
PostgresError: foreign key constraint "product_categories_category_id_fk" cannot be implemented
That being said you should be wary of using cascade, it may seem like the right thing to do but it can be dangerous in certain scenarios.
14 replies
DTDrizzle Team
Created by Tenkes on 9/22/2024 in #help
PostgresError: foreign key constraint "product_categories_category_id_fk" cannot be implemented
You should be able to add it within your .references
14 replies
DTDrizzle Team
Created by Tenkes on 9/22/2024 in #help
PostgresError: foreign key constraint "product_categories_category_id_fk" cannot be implemented
Great to hear! I was a bit of a silly billy and had forgotten the otherside of the relation for my issue haha! In the future as well it might be a good idea to make use of https://drizzle.run 🙂
14 replies
DTDrizzle Team
Created by bhakta_jam on 9/22/2024 in #help
Only run some queries if conditions changed.
It's a bit of a complex answer that is quite dependent on a myriad of different factors but generally what you'll notice in large scale applications is they don't show the total page options in their pagination instead they show something resembling First 1,2,3.. 10 Last where 10 is the page limit that it's recursed. If there's less than 10 it will be let's say 7. If you're wanting to go down this path, without introducing extra load on your servers, dependent on your architecture the generally accepted solution is to use Redis as your cache layer and through different caching patterns based on your needs you can solve it effectively.
4 replies
DTDrizzle Team
Created by Tenkes on 9/22/2024 in #help
PostgresError: foreign key constraint "product_categories_category_id_fk" cannot be implemented
I would say the issue is the categories is being defined as an array of uuid's with a relation on it. I'm not entirely that well versed in the Drizzle schema and am having relation issues myself however I would think you would need to go through the relations API.
14 replies