Closed mastastealth closed 9 years ago
Mongol won't find it by default, but you should be able to tell Mongol to look for it using the api here: https://github.com/msavin/Mongol/blob/master/documentation/COMPATIBILITY.md The docs suggest not using variable names, but try it anyway. I've got a feeling it might work:
Session.set("Mongol", {
collections: ["local",<any other collections you want>]
})
I'll be interested to hear the results.
@JackAdams Ok, running that does add it to the list, and it seems to receive the correct count of items, however moving through the items continually spits out "Cannot read proper 'find' of undefined" with no data in the documents.
Hmm... yeah, I think I know why. This problem is fixable, but at the moment, it's something Mongol doesn't support. @msavin -- want me to work on a fix?
@JackAdams Not yet - lets wait for Meteor Toys
Update for @JackAdams: if you have time, that would be great :+1:
:+1:
I've added full local collection support to Constellation, but it took a pretty substantial refactor. I don't know whether you'd want me to take the knife to Mongol in the same way.
Basically, in each of the event handlers that is going to fire a server side mutator method, you need to:
Here's an example for the "Duplicate" event handler from the Constellation codebase. There are similar bits of code for the delete and save methods, but the editable-json (0.5.7+) has its own mutator methods and local collection support, so no need to worry about that.
Local collection detection is here -- it's a pretty blunt instrument, but works for any local collections that are in the global scope.
Local collections will come in a future update for Mongol. In the meanwhile, I will close the thread since it is not as issue or advertised feature.
If I define a collection like so:
local = new Mongo.Collection(null);
Mongol doesn't seem to grab it. Is there anyway to see this besides using the console?