You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is my needs:
I have a list of records that belongs to customers. For the business needs, I have to split my records by customers in differents databases. So I have a provider that implements 2 mongoose instances. The first one contains my customers and the name of the database. The second one, is connected to the customer's database with a middleware, then when I am in my controller, through the IOC, i have my instance that is connected to the right db. But when I send a request at the same time for another customer, the database will change on the fly and the first record will be saved on my second customer's database.
How can I handle this behavior by isolating the IOC for each request ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
HI everyone !
This is my needs:
I have a list of records that belongs to customers. For the business needs, I have to split my records by customers in differents databases. So I have a provider that implements 2 mongoose instances. The first one contains my customers and the name of the database. The second one, is connected to the customer's database with a middleware, then when I am in my controller, through the IOC, i have my instance that is connected to the right db. But when I send a request at the same time for another customer, the database will change on the fly and the first record will be saved on my second customer's database.
How can I handle this behavior by isolating the IOC for each request ?
Beta Was this translation helpful? Give feedback.
All reactions