Tibo
Explore posts from serversDTDrizzle Team
•Created by Tibo on 4/18/2024 in #help
Cascade delete not working
I ended up deleting my db and creating it again and I haven't tested it again sorry
6 replies
DTDrizzle Team
•Created by Tibo on 4/18/2024 in #help
Cascade delete not working
@Sillvva I did a push to my db
6 replies
DTDrizzle Team
•Created by Tibo on 4/18/2024 in #help
Cascade delete not working
End of schema:
6 replies
DTDrizzle Team
•Created by Tibo on 3/29/2024 in #help
TypeError: Cannot read properties of undefined (reading 'compositePrimaryKeys')
When I do a push
3 replies
DTDrizzle Team
•Created by Rodrigo on 3/21/2024 in #help
Unable to rename table that uses a composite key
@Rodrigo I have the same problem. Did you solve it ?
2 replies
DTDrizzle Team
•Created by Tibo on 3/17/2024 in #help
How to do inserts in many-to-many relations ?
Here's how I handle the insert for now (it's not complete):
I'm using the music metadata.
I'm currently looping over each artist and checking whether they exist. If they don't I'm creating them and I get their ID.
This is where I'm stuck, as there are multiple tables for the relations I don't know in which one I should do the insert and if I'm using the right method. I guess that I need to get the author id and the music id and put them in one of the relation tables but I don't know if I should do that in the loop or outside and if there are risks that doing the insert in a loop could break it.
Do I have the correct way of doing it or is there a better way ? How would you refactor my code ?
2 replies