skip to Main Content

User0 has a has runbooks stored in

/Runbook/user0/runbooks/0…n

UserX has runbooks stored at
/Runbook/userX/runbooks/0…n

UserX would like to include user0/runbooks/55 in his runbooks collection but doesn’t want to move a copy into the runbooks collection. Is there a way to add a document into UserX’s runbooks collection that will point to user0’s 55 document?

2

Answers


  1. You can simply store enough information about the document in a field (for example, its ID or its full path). Or you can store a reference type field that also essentially just contains the full path of the document.

    See also:

    There is no type of document that itself is just a reference to another document. References are only valid as a document field type. You will have to model your data to account for this fact.

    Login or Signup to reply.
  2. Is there a way to add a document into UserX’s runbooks collection that
    will point to user0’s 55 document?

    No. There is not. Duplicate data is common in document databases like Firestore, or Real Time Database. The correct thing to do is to duplicate the data.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search