Skip to content

[REQUEST] Be able to have local only collection #341

@schlaegerz

Description

@schlaegerz

I have a case where I want to keep some data locally and it is much easier for various reasons if it is a mongo collection from Meteor, I do this on web with meteor so it should be easily possible to do it with this package.

On web when you create a new mongo collection
new Mongo.Collection(null, {connection: null})
Either passing no name, or passing 'connection:null' will result in it being a local only collection.

Right now if you were to make this collection all the items get removed after a short time out due to trying to insert it in a server collection.

My suggested change is to check mark it as a local connection in the case where you don't pass a name, and then skip the ddp calls in the insert/update/remove functions.

Temporary workaround I found is I can call:
myCollection._collection.upsert({_id: data._id}, {$set:data})
Which skips all the ddp logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions