Replies: 1 comment
-
I believe you should be able to do the same, just create the reference via const book = em.create(Book, { id: 123 }, { managed: true, partial: true });
book.tags.add(new BookTag(...));
await em.flush(); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know I can update some properties without loading the entities as described in the docs here.
I was wondering if something similar was possible with collections.
Using the books and tags example of the official docs, what if I want to add a tag to 10.000 books in one batch?
is there a way to do this without having to first load the 10.000 books?
Right now I'm using a stored procedure, but it would be amazing if it could be managed somehow by mikro-orm!
Thank you
Beta Was this translation helpful? Give feedback.
All reactions