Im trying to get an cursor with checking if the field exists or not.
client and server side: the query works but i have to publish my whole collection.
> Meteor.publish('projects.all.list', function projectsAllListPublication() {
> return Projects.find({ }, {
> fields: {
> _id: 1,
> createdAt: 1,
> },
> });
> });
> Template.cardArea.onCreated(function cardAreaOnCreated() {
> this.subscribe('projects.all.list');
> });
> Template.cardArea.helpers({
> documents () {
> return Projects.find({ courseId: { $exists: false} }, { skip, limit: 12, sort: { createdAt: -1 } });
> },
> });
server side: if i wanna subscribe the collection with the same query like above, my Meteor is exploding… nothing works anymore
> Meteor.publish('projects.all.list', function projectsAllListPublication() {
> return Projects.find({ courseId: { $exists: false} }, {
> fields: {
> _id: 1,
> createdAt: 1,
> },
> });
> });
> Template.cardArea.onCreated(function cardAreaOnCreated() {
> this.subscribe('projects.all.list');
> });
> Template.cardArea.helpers({
> documents () {
> return Projects.find({ courseId: { $exists: false} }, { skip, limit: 12, sort: { createdAt: -1 } });
> },
> });
Getting no Errors