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
Is your feature request related to a problem? Please describe.
My organization is creating a multitenant application using Sails, with Sequelize as our ORM to connect to existing database(s). Our goal is for new tenants with separate datasources to be able to be added purely through configuration changes. However, currently each model can be associated with only a single Sequelize instance.
Describe the solution you'd like
A way to namespace Models so that model multiple instances which function identically but point to different datasources can be created.
Describe alternatives you've considered
We could create separate model definitions for each tenant and explicitly name which datasource to associate with, but this violates our configuration-only requirement and will caused an ever-increasing maintenance burden as the number of models, tenants and places where they are used grow. (x models times y tenants times z places where a model is used and which one to use must be determined)
The text was updated successfully, but these errors were encountered:
Hi @Damienmarble! Hmm... Interesting feature. I personally don't see use cases for this.
But if someone decides to implement it without breaking major API — I'll gladly merge his PR :)
I see that @ThisIsNoZaku is working on this.
Is your feature request related to a problem? Please describe.
My organization is creating a multitenant application using Sails, with Sequelize as our ORM to connect to existing database(s). Our goal is for new tenants with separate datasources to be able to be added purely through configuration changes. However, currently each model can be associated with only a single Sequelize instance.
Describe the solution you'd like
A way to namespace Models so that model multiple instances which function identically but point to different datasources can be created.
Describe alternatives you've considered
We could create separate model definitions for each tenant and explicitly name which datasource to associate with, but this violates our configuration-only requirement and will caused an ever-increasing maintenance burden as the number of models, tenants and places where they are used grow. (x models times y tenants times z places where a model is used and which one to use must be determined)
The text was updated successfully, but these errors were encountered: