-
Notifications
You must be signed in to change notification settings - Fork 64
Description
I have 2 tables. It is going to be common for me to insert table A, get the id, and then insert table B. Other than the id reference, they don't rely on each other at all. I was wondering if it is possible to add a way to insert both rows simultaneously (without the id) and then (in the background) patch document B with the id of document B.
Alternatively, it would be nice to:
(a) be able to "predict" the next id, so I can set table B to have that id for its reference)
(b) be able to generate an id, and force a row to have said id
(Both of these would need to be sizably faster than just inserting the table)
I understand that this might not be possible, but I think it is probably a common enough pattern to warrant a look into at least.
(To be clear, I don't want a helper that just inserts the 2 tables, like how we'd do now, I am looking for a way to insert them asynchronously)