Skip to content

Does Integrify only update it's target collections when one of it's master fields updates? #77

Answered by anishkny
narkeeso asked this question in Q&A
Discussion options

You must be logged in to vote

@narkeeso thanks for trying out integrify!

Yes, you are correct. The attributes are replicated from source to target only upon updating of the source document. The target document(s) need to exist for integrify to modify them.

Fundamentally, REPLICATE_ATTRIBUTES creates a Firestore onUpdate trigger, which is only called when a document exists and its value is changed (see Cloud Firestore triggers docs).

This is best suited for so called "one-to-many" relationships as explained in the introductory blog post.

The reason for this is that integrify cannot predict how many target documents to create every time a new source document is created. In your example, every time a user document is cre…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@narkeeso
Comment options

@anishkny
Comment options

Answer selected by anishkny
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants