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
{{ message }}
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.
instead of creating a new collection for extended i would like to use the same base collection. Is this possible and how? I tried to use mongoose SchemaOptions, but seams not to work for this variant?
you want to have a child model, extending the parent model
you want the parent & child to use the same collection
and you want to still query the child model, but only with the values from the parent model
right?
yes, it is half possible:
you can have a child & parent in the same collection with Discriminators, BUT they are currently not supported with typegoose, WIP: Discriminators #333 adds it, but also breaks some things, so no merge in the near future
and no, to my knowledge it is not possible, at least not with typegoose and the correct types ...
Hello everyone,
is it possible to extend a created typegoose class (entity) but using the same collection as the parent class?
example:
instead of creating a new collection for extended i would like to use the same base collection. Is this possible and how? I tried to use mongoose SchemaOptions, but seams not to work for this variant?
The goal is to be able to query the mongo database with the BaseModel helper.
The text was updated successfully, but these errors were encountered: