Skip to content

Maintain many to many relation #419

Closed Answered by noam-honig
Darkside73 asked this question in Q&A
Discussion options

You must be logged in to vote

That's one option.
Another is to work a little harder to figure out which categories already exist, remove only the ones that are no longer needed and insert ones that are new

Here's a some code that I've writen a while back to do that in the crm-demo (we didn't have deleteMany back then)

https://github.com/remult/crm-demo/blob/master/src/Deals/Deal.entity.ts#L104

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Darkside73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants