-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with nested arrays #6
Comments
I see the same thing, on the same line. Did anything come of this? |
Hi, I got the same problem at my app when I started to use the // Removing an item
collection.remove(indx, function () {
collection.set(collection.get())
})
// Inserting an item
collection.insert(indx, obj, function () {
collection.set(collection.get())
})
// Moving an item
collection.move(from, to, function () {
collection.set(collection.get())
}) The if (!collection.get()) collection.set([])
collection.push(obj) This not solves the problem, but keeps your app working. |
That did work. Thanks so much! |
I am currently experiencing something that seems like a related problem: I'm trying to subscribe within an array, and it doesn't work. Doing model.subscribe('collection.id.nested.array') works fine and if I print out the array I can see all the data is there. But doing model.subscribe('collection.id.nested.array.0') doesn't work at all. It returns an empty object, even when I know data is there. What's funny is that this works fine with the in-memory data store, but as soon as I started using racer-db-mongo it started failing. |
When calling some mutator methods on nested arrays (like collection.id.nested.array.0), the array is emptied.
After some debugging, I found the problem to be in /lib/index.js, line 326:
var arr = found && found[relPath];
The stored array is retreived, but not found: found['collection.id.nested.array'] returns null.
The text was updated successfully, but these errors were encountered: