update many to many relationship
I'm working with Drizzle ORM and have a many-to-many relationship between projects and users using a projectUsers join table.
When updating a project's members, I see two possible approaches:
1- Delete all existing members and reinsert the new ones
2-Selectively update the members
- Add new members, remove missing ones, and keep unchanged ones.
i have prepared schemas and relations:
existing query to update
project
(without updating projectUsers):
0 Replies