ground-db icon indicating copy to clipboard operation
ground-db copied to clipboard

problem inserting on client only db

Open bgrayburn opened this issue 8 years ago • 0 comments

Thanks for making this package @Raix, I'm still always surprised by how many packages you're running.

Here's my problem, I've defined a ground db this way:

GroundSubs = new Ground.Collection('submissions', {conection: null});

and am trying to insert this way on the dev console getting the following error (note: I have zones.js on giving a pretty exhaustive stack trace):

GroundSubs.insert({test:"test"})
"EHcZKeymZCgPQPzfy"
reporters.js?1440795872491:67 Error: insert failed: Method not found


> Before: 176ms (diff: 176ms)
    at applyHook [as apply] (http://meteor.local/packages/ground_db.js?cf9d0a41470603cdf75f74faa82fb1a04b52340f:1022:30)
    at Mongo.Collection.(anonymous function) (http://meteor.local/packages/mongo.js?3cfe0c5981c197df33036a37574850f057e934a6:656:26)
    at Mongo.Collection.(anonymous function) [as insert] (http://meteor.local/packages/aldeed_collection2.js?a0502e6da57755591b47aa04c532a32d3ecf4605:222:23)
    at _groundUtil.Collection.insert (http://meteor.local/packages/ground_db.js?cf9d0a41470603cdf75f74faa82fb1a04b52340f:1116:17)
    at null.<anonymous> (http://meteor.local/packages/matb33_collection-hooks.js?84a1c8cf4708b40e4c95f8e059ef1a0bdb5f5897:328:18)
    at collection.(anonymous function) [as insert] (http://meteor.local/packages/matb33_collection-hooks.js?84a1c8cf4708b40e4c95f8e059ef1a0bdb5f5897:143:21)

I realize I haven't subscribed/published/dealt with permissions, but it isn't clear to me how to do this on the client.

I also noticed the tests in groundDB.client.tests.js on line 55 which resembles this case don't do anything fancy like permissions, but it's also commented out.

bgrayburn avatar Aug 28 '15 21:08 bgrayburn