-
Notifications
You must be signed in to change notification settings - Fork 9
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
Throw better error for incorrect config #22
Comments
Hey @RamiYahyaRY thanks for trying out Could you edit the configuration line thus:
LMK if it works. I can enhance it to throw better error message. |
@anishkny Thanks a lot. That works. Is there a way to bind a collection to a subcollection? Consider this:
Is there a way to do something like this:
|
@RamiYahyaRY currently, there isn't a way to replicate to nested collections (subcollections). Although it is on the roadmap as #9. I will leave this issue open to throw better error messages in case of incorrect config (your original issue). |
@RamiYahyaRY you can now replicate to sub-collections using module.exports.replicateMasterToDetail = integrify({
rule: 'REPLICATE_ATTRIBUTES',
source: {
collection: 'master',
},
targets: [
{
collection: 'subcollection',
foreignKey: 'masterId',
attributeMapping: {
masterField1: 'detail1Field1',
},
},
isCollectionGroup: true, // <---- NEWLY ADDED!
], This was added in v2.1.0 |
Can the source be a collection group? |
I get this error:
I have the following Firebase Cloud Function running in Node 8 environment with Typescript code:
The replication function seems to fire correctly after an update on the original collection, as I can see from the logs, and the error is logged directly afterwards:
The text was updated successfully, but these errors were encountered: