dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 379 forks source link

.only() doesn't work on chained find #646

Open Bramboos opened 9 years ago

Bramboos commented 9 years ago

When I use this code:

User.find({
    token: 'test'
}).only(
    'name',
    'token',
    'created'
).run(function(err, user) {
    console.log(user);
});

The console.log will print all fields of the 'user' database while I mentioned only 3 fields. When I try to debug the query and all other things go well but the result in the callback is completely different.

I use version 2.1.26 of the orm with node.js version 0.10.35.

tahsintahsin commented 9 years ago

have the same issue