-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
docsThis issue is due to a mistake or omission in the mongoosejs.com documentationThis issue is due to a mistake or omission in the mongoosejs.com documentation
Milestone
Description
When you create an array discriminator, you do something like this:
var Clicked = docArray.discriminator('Clicked', clickedSchema);
But if you do a model discriminator you can add a third parameter to specify the discriminator key value:
var Clicked = Event.discriminator('Clicked', clickedSchema, "clicked");
Just wondering why we can't use a 3rd discriminator key parameter when we use array discriminators? I'm assuming the first parameter is still the model name, so it would be nice to have the ability to specify the key value if you want it to be different from the Model name.
Thanks!
Metadata
Metadata
Assignees
Labels
docsThis issue is due to a mistake or omission in the mongoosejs.com documentationThis issue is due to a mistake or omission in the mongoosejs.com documentation