1602 / jugglingdb

Multi-database ORM for nodejs: redis, mongodb, mysql, sqlite3, postgresql, arango, in-memory...
http://1602.github.io/jugglingdb/
2.04k stars 241 forks source link

model.toObejct(false) only returned properties defined in schema. #332

Closed taoyuan closed 10 years ago

taoyuan commented 10 years ago

line 685 in model.js

682    if (!onlySchema) {
683        Object.keys(self).forEach(function (attr) {
684            if (!data.hasOwnProperty(attr)) {
685                data[attr] = this[attr];
686            }
687        });
688    }

should be:

685                data[attr] = self[attr];