Open rodmanlu opened 10 years ago
Can you demonstrate this with a sample code. Then I can get a better understanding of the issue.
case 1 sync ( n1 is undefined with Smart Collection):
n1 = stkbasic.update({ _id: stk._id }, { $set: one } );
console.log('update id: ' + stk.code + ' - ' + n1 );
case 2 sync ( n2 is undefined with Smart Collection): up={}; up['y']=year; up[fld]=val; n2 = stkbasic.update( { _id: stkId }, { $addToSet : { years : up } }); console.log('update n2:' + n2);
case 3 async ( err and count are undefined with Smart Collection): stkbasic.update( { _id: stkId, month: {$elemMatch: { m : d } } }, { $set : u }, function(err, count){
console.log('count:' + count + ', err:' + err);
} );
Not I got the issue. Yes it is undefined. It's not a bug simply I forgot to implement it. Will do it.
Okay, I've released a new version(0.3.23
)
It has the fix.
thanks. but the version 0.3.23 worked when update successfully. still return undefined if update fail not value 0
i try to update collection with Meteor.Collection ( even with async callback function ) , the return error and count is correct always. but when i replace Meteor.Collection with Meteor.SmartCollection . all return value change to 'undefined' . what can i do ? or this is bug ?