Hi I am working on my project where I have integrated Forest Admin with MongoDB, which creates a second backend app. I am working with two databases, which I have already made the connection and everything works fine.
What I would like to know is how to relate a collection from database 1 with a collection from database 2.
Context: I have db1 and db2, in db1 I have the collection portfolio and in db2 I have the collection charities. I would like to relate these collections in such a way that a portfolio can have many charities (related by charity_id).
I suppose that it is possible, the issue is that it is complicating me to make the relation following the documentation presented in the page since the models are in different databases.
I would appreciate if anyone could help me to make such a relationship,
Thank you very much!
Here are my schemas! :
Set up information:
“express”: “~4.17.1”,
“forest-express-mongoose”: “^8.0.0”,
“mongoose”: “~5.8.2”,