I’m start to use reywood:publish-composite
I get a strange behaviour:
If I add in the children the same collection with different fields I get the publication well but if I connect with another collection I do not get the data of the second.
// this works well, I can get fields from children
publishComposite("objects", function(options) {
return {
find() {
return Objects.collection.find({}, { fields: { fieldOne: 1 } });
},
children: [{
find(object) {
return Objects.collection.find({ _id: object._id }, { fields: { fieldTwo: 1 } });
}
}]
}
});
// this don't works well, I can't get fields from children
publishComposite("objects", function(options) {
return {
find() {
return Objects.collection.find({}, { fields: { fieldOne: 1 } });
},
children: [{
find(object) {
return ObjectModels.collection.find(object.objectModelId);
}
}]
}
});
Does anyone have any experience with this ?