These are chat archives for Automattic/mongoose

12th
Mar 2017
Digby Knight
@digbyk
Mar 12 2017 12:30
Hi all - any way to distinguish a discriminator name from the value used in the discriminator key? I want to set up discriminators for two models (so need different names) but would like the same value in the __t field.
Thanks!
In case the "why" helps, I'm creating a multi-tenant app and want each tenant to have a discriminator model over two base models, but always use their tenant name as the discriminator key. Perhaps I shouldn't be using this model for multitenancy, but it seems a really good fit otherwise.