dresende / node-orm2

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

Issue with `count` and `distinct` #662

Open louy opened 9 years ago

louy commented 9 years ago

Hello,

I'm having a weird issue. Here's an example:

Person.aggregate().distinct(`country`).count().get(function(err, count) {});

The resulting count is actually the first value of the field country. Without count it works as expected.