Skip to content
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

Planning firestore-one-to-many extension 🧠 #54

Open
yamankatby opened this issue Mar 12, 2023 · 1 comment
Open

Planning firestore-one-to-many extension 🧠 #54

yamankatby opened this issue Mar 12, 2023 · 1 comment

Comments

@yamankatby
Copy link
Owner

yamankatby commented Mar 12, 2023

Implements the one-to-many relationship between Firestore collections.

Params 🛠️

Target Collection Path

The path to the collation containing the documents represents the first side of the relation, the "one" side.
Example: authors

Destination Collection Path

The path to the collation containing the documents represents the second side of the relation, the "many" side.
Example: books

Target Ref Field Name

The name of the field in the destination collection that contains the reference of the document in the target collection.
Example: authorId

Destination Ref Field Name

The name of the field in the target collection where the id of the destination document will be stored.
Example: bookId
Default: id

Target Data Field Name

The name of the field in the target document where the list of the destination documents will be stored.
Example: books

Destination Data Field Name

The name of the field in the destination document where the data from the target document will be stored.
Example: author

Fields to copy from the target collection

A comma-separated list of field names to copy from the target collection to the destination collection.
Example: name,biography

Fields to copy from the destination collection

A comma-separated list of field names to copy from the destination collection to the target collection.
Example: title,summary

Target document deletion behaviour

What should happen to the documents in the destination collection when a related target collection is deleted?

@Meistercoach83
Copy link

Hey! I think I was able to add this features to my project - would you like to check my code and take a look if you could use it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants