janez89 / mongoose-materialized

mongoose materialized plugin
59 stars 22 forks source link

parent is not defined with AppendChild #3

Closed btmdave closed 10 years ago

btmdave commented 10 years ago

Hello,

I seem to be getting parent is not defined anytime I call:

Cat.AppendChild('_id', {name : 'test'}, function(err, doc){});

If I don't specify an 'id' value and instead leave it null, it seems to work. However if I put in an object id or the full model, it always says parent is not defined and errors out.

Any idea what could be causing this? Below is a short trace:

at TCP.onread (net.js:526:21)ReferenceError: parent is not defined at Promise.<anonymous> (/var/www/Proj/server/node_modules/mongoose-materialized/lib/materialized.js:153:33)

Thanks!

btmdave commented 10 years ago

I was using 1.0.4, looked like it was just a variable typo which is fixed in 1.0.6, upgrading did the trick!