-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using discriminators #31
Comments
Hi @esimonm thanks for the feedback. Regarding you query on |
Thanks for the quick reply @sandeepsuvit, really appreciate it. Please see the following error I'm getting when declaring the discriminators on the module's And here is the Let me know if you need any more info, thanks! |
Hi @esimonm thanks for pointing it out. I haven't used |
Thanks for the quick update! Tried it and there are no longer any type errors, but unfortunately, it's still giving an error when compiling as shown here: "Issue" is the Entity the module is based on. Two other entities are used in the discriminator array. Seems like the Tenancy module is not importing the Issue module? Please let me know if there's any more info needed. Thanks again. |
@esimonm can you provide me a minimal example working sample repo to test this out. |
Hi @sandeepsuvit, I hope you are doing well. First, thanks for developing this, I've found it super helpful and so easy to apply!
I wonder if it'd be possible for us to apply discriminators the same way as Nest currently does (please see the application in https://docs.nestjs.com/techniques/mongodb#discriminators). Currently, there is no way to declare the discriminators in the module's imports, as it throws a type error as the
discriminators
field is not declared in theModelDefinition
interface you created.This would be a great addition to our current projects.
Again, thanks for all your effort, looking forward to your reply!
The text was updated successfully, but these errors were encountered: