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
Before populating the referenced field with a collection, the referenced collection needed to be registered, currently, to do that, we run some find a method that has no consequence, otherwise, we can get a Model not registered error. It can be pretty confusing in code.
I think the cause of this problem is that the a schema is only registed to a model when we first import it and invoke a method on it, which might not have happened when we run populate. I think can be fixed by running all model registration statement(like the following) when the server first starts.
The text was updated successfully, but these errors were encountered:
Before populating the referenced field with a collection, the referenced collection needed to be registered, currently, to do that, we run some find a method that has no consequence, otherwise, we can get a Model not registered error. It can be pretty confusing in code.
I think the cause of this problem is that the a schema is only registed to a model when we first import it and invoke a method on it, which might not have happened when we run populate. I think can be fixed by running all model registration statement(like the following) when the server first starts.
The text was updated successfully, but these errors were encountered: