标签: node.js mongoose npm
当我保存猫鼬模型时:
steamBot.items = []; steamBot.save(function(){ callback(); });
但是如果steamBot.items不为空,那么mongoose就不会保存它。
答案 0 :(得分:-1)
尝试使用push()方法
steamBot.items.push('item1'); steamBot.save( ... )