My project has two databases: ‘Users’ and ‘Content’. The ‘Content’ database contains a collection called ‘Submissions’, whose documents reference documents in a collection ‘Users’ in the ‘Users’ database. I thought that this was a logical way to structure my database(s), but from what I’ve read, ‘Ref’ can only be used for collections within the same database. How should I proceed, therefore, with referencing these documents?
You cannot create references to documents in peer or parent databases. It is possible to reference documents in a child database, but following those references requires using a key with the
Ideally, all of the documents that are involved in relationships should be in the same database.