Publish-Composite not working anymore?


#1

Hello.
I’m trying to implement reywood:publish-composite in my project in Meteor 1.4.1 + React
The thing is, it’s not working… The children are not being published. Any ideas what is happening?

Thanks for the help…

if (Meteor.isServer) {
Meteor.publishComposite(‘empleados.completo’, function () {
return {
find: function () {
return Empleados.find({});
},
children: [{
find: function (empleado) {
return Lineas.find({ _id: empleado.linea })
}
}, {
find: function (empleado) {
return Areas.find({ _id: empleado.area })
}
}]
}
});
}

On my component…

export default createContainer(() => {
Meteor.subscribe(‘lineas’);
Meteor.subscribe(‘areas’);
Meteor.subscribe(‘empleados.completo’);
return {
lineas: Lineas.find({}).fetch(),
areas: Areas.find({}).fetch(),
empleados: Empleados.find({}).fetch()
}
}, CatalogoEmpleados);